Sfoglia il codice sorgente

应急订单不允许修改时间,默认2020-01-01

QuietShadow 3 anni fa
parent
commit
2639f93dc8

+ 41 - 5
src/views/energyPlan/components/supplyAndDemand/planProjectCBD.vue

@@ -774,11 +774,20 @@
                     label="排产日期"
                     prop="jhTime"
                     >
-                    <zj-timegran-date
+                    <el-date-picker
+                      v-model="dialog.editorBox.form.data.jhTime"
+                      type="date"
+                      style="width: 100%;"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd"
+                      :disabled = "dialog.editorBox.form.data.dateEnable">
+                    </el-date-picker>
+                    <!-- <zj-timegran-date
                     v-model="dialog.editorBox.form.data.jhTime"
                     style="width: 100%;"
                     :timegranId="'DAY'"
-                    ></zj-timegran-date>
+                    disabled = "true"
+                    ></zj-timegran-date> -->
                 </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -786,11 +795,20 @@
                     label="交货日期"
                     prop="deliveryDate"
                     >
-                    <zj-timegran-date
+                    <el-date-picker
+                      v-model="dialog.editorBox.form.data.deliveryDate"
+                      type="date"
+                      style="width: 100%;"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd"
+                      :disabled = "dialog.editorBox.form.data.dateEnable">
+                    </el-date-picker>
+                    <!-- <zj-timegran-date
                     v-model="dialog.editorBox.form.data.deliveryDate"
                     style="width: 100%;"
                     :timegranId="'DAY'"
-                    ></zj-timegran-date>
+                    disabled = "true"
+                    ></zj-timegran-date> -->
                 </el-form-item>
             </el-col>
         </el-row>
@@ -805,6 +823,7 @@
                    v-model="dialog.editorBox.form.data.tag"
                    placeholder=""
                   style="width: 100%;"
+                   @change="isMileageCardOrder"
                   >
                   <el-option
                   v-for="item of nameObj.tag.arr"
@@ -1103,6 +1122,7 @@ export default {
                             iateralArea: '',
                             deliveryDate: '',
                             tag: '0',
+                            dateEnable: false
                         },
                          rules: {
                              planWeight: [
@@ -2063,6 +2083,9 @@ export default {
             that.dialog.editorBox.form.data.lengthTimesWidth = '';
             that.dialog.editorBox.form.data.memo = '';
             that.dialog.editorBox.form.data.tag = '0';
+            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.dateEnable = false;
             that.dialog.editorBox.show = true;
              setTimeout(() => {
                 that.$refs['dialog_form'].clearValidate();
@@ -2574,7 +2597,20 @@ export default {
           }).catch(() => {
             _this.loading = false
           })
-        }
+        },
+        // 订单类型下拉框选择事件
+        isMileageCardOrder(val){
+          let that = this;
+          if (val == '1') {
+           that.dialog.editorBox.form.data.deliveryDate = '2020-01-01';
+           that.dialog.editorBox.form.data.jhTime = '2020-01-01';
+           that.dialog.editorBox.form.data.dateEnable = true;
+          } else {
+            that.dialog.editorBox.form.data.deliveryDate = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.jhTime = formatDate(new Date(),'yyyy-MM-dd');
+            that.dialog.editorBox.form.data.dateEnable = false;
+          }
+        },
     }
 }
 function sortNumber (a, b) {