|
|
@@ -53,6 +53,7 @@
|
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
<el-form-item label="交付日期:" prop="deliveryTime">
|
|
|
<el-date-picker
|
|
|
+ :picker-options="pickerOptions"
|
|
|
style="width: 100%"
|
|
|
v-model="form.deliveryTime"
|
|
|
type="date"
|
|
|
@@ -146,11 +147,13 @@
|
|
|
import { getCode } from '@/api/codeManagement';
|
|
|
import EquipmentDialog from '../components/EquipmentDialog.vue';
|
|
|
import { createOrUpdate, getOrderDetail } from '@/api/saleOrder';
|
|
|
+ import dayjs from "dayjs"
|
|
|
export default {
|
|
|
components: {
|
|
|
EquipmentDialog
|
|
|
},
|
|
|
data () {
|
|
|
+
|
|
|
return {
|
|
|
visible: false,
|
|
|
loading: false,
|
|
|
@@ -158,7 +161,8 @@
|
|
|
productInfoList: [],
|
|
|
deliveryRequirements:1,
|
|
|
orderType:1,
|
|
|
- orderLibraryType:2
|
|
|
+ orderLibraryType:2,
|
|
|
+ deliveryTime: dayjs(new Date().getTime() + 3600 * 1000 * 24 * 10).format('YYYY-MM-DD')
|
|
|
},
|
|
|
// 表单验证规则
|
|
|
rules: {
|
|
|
@@ -171,7 +175,14 @@
|
|
|
{ id: 2, label: '外销订单' },
|
|
|
{ id: 3, label: '预制订单' }
|
|
|
],
|
|
|
- title: '创建订单'
|
|
|
+ title: '创建订单',
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate: (time) => { // 禁用日期
|
|
|
+ let nowData = new Date()
|
|
|
+ nowData = new Date(nowData.setDate(nowData.getDate() - 1))
|
|
|
+ return time < nowData
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -194,13 +205,16 @@
|
|
|
},
|
|
|
getDetail (code) {
|
|
|
getOrderDetail(code).then((res) => {
|
|
|
- console.log('返回', res);
|
|
|
this.form = res;
|
|
|
});
|
|
|
},
|
|
|
cancel () {
|
|
|
this.form = {
|
|
|
- productInfoList: []
|
|
|
+ productInfoList: [],
|
|
|
+ deliveryRequirements:1,
|
|
|
+ orderType:1,
|
|
|
+ orderLibraryType:2,
|
|
|
+ deliveryTime: dayjs(new Date().getTime() + 3600 * 1000 * 24 * 10).format('YYYY-MM-DD')
|
|
|
};
|
|
|
this.$refs.form.clearValidate();
|
|
|
this.visible = false;
|