Răsfoiți Sursa

修改 装配

chencc 1 an în urmă
părinte
comite
a8870acd48

+ 4 - 0
src/views/materialPlan/components/producePlan.vue

@@ -148,6 +148,8 @@
               </template>
 
               <template v-slot:demandQuantity="{ row }">
+                <div>
+                  <!-- 需求数量 -->
                 <el-input
                   v-model="row.demandQuantity"
                   placeholder="请输入"
@@ -160,6 +162,8 @@
                       ))
                   "
                 ></el-input>
+                </div>
+               
               </template>
               <!-- <template v-slot:purchasingCycle="{ row }">
                  <el-input

+ 2 - 0
src/views/materialPlan/index.vue

@@ -272,6 +272,8 @@
         });
       },
       handleEdit(type, row) {
+
+        console.log(row.orderType,'---------------');
         if (row.orderType == 1) {
           this.$refs.planEditDialogRef.open(type, row);
         } else if (row.orderType == 2) {

+ 1 - 1
src/views/productionPlan/components/productionPlan-search.vue

@@ -356,7 +356,7 @@
         where: { ...defaultWhere },
         treeData: [],
         productTypeList: [
-          { code: 2, name: '加工(MBOM)' },
+          { code: 1, name: '加工(MBOM)' },
           { code: 3, name: '装配(ABOM)' },
         ],
       };

+ 8 - 1
src/views/productionPlan/index.vue

@@ -628,9 +628,16 @@
             show: this.clientEnvironmentId == '4',
             minWidth: 110
           },
+          {
+            prop: 'planDeliveryTime',
+            label: '计划交付日期',
+            align: 'center',
+            width: 110,
+            showOverflowTooltip: true
+          },
           {
             prop: 'reqMoldTime',
-            label: '计划完成日期',
+            label: '订单要求计划交付日期',
             align: 'center',
             width: 110,
             showOverflowTooltip: true

+ 5 - 0
src/views/saleOrder/index.vue

@@ -374,6 +374,9 @@
     },
     methods: {
       async check(){
+
+        console.log(111111333333);
+
         if(this.selection.length > 0){
           let codeList = [];
           this.selection.map(ele => {
@@ -523,6 +526,8 @@
       },
 
       onSortChange(e) {
+        console.log(111111111,e);
+
         let sort = {
           orderBy: e.order,
           sortName: e.prop

+ 46 - 0
src/views/saleOrder/salesToProduction.vue

@@ -462,6 +462,36 @@
             prop="deliveryTime"
             width="160"
           >
+          <template slot-scope="scope">
+              <el-form-item
+                label-width="0px"
+                :prop="'salesOrders.' + scope.$index + '.deliveryTime'"
+                :rules="{
+                  required: true,
+                  message: '请选择交付日期',
+                  trigger: 'blur'
+                }"
+                class="table-item"
+              >
+                <el-date-picker
+                  style="width: 100%"
+                  v-model="scope.row.deliveryTime"
+                  @change="changeDate(scope.row, scope.$index)"
+
+                  :pickerOptions="{
+                    disabledDate: (time) =>
+                      time.getTime() <
+                      new Date(new Date().setHours(0, 0, 0, 0)).getTime()
+
+                  }"
+                  type="date"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd"
+                >
+                </el-date-picker>
+
+              </el-form-item>
+            </template>
           </el-table-column>
           <el-table-column
             label="要求完成日期"
@@ -490,6 +520,7 @@
 
                   }"
                   type="date"
+                  disabled
                   placeholder="选择日期"
                   value-format="yyyy-MM-dd"
                 >
@@ -707,7 +738,22 @@ export default {
 
     }
   },
+
   methods: {
+
+    // 验证时间是否超期
+    changeDate(item,i){
+      console.log(this.isTimeAGreaterThanB(item.deliveryTime,item.reqMoldTime));
+      if(this.isTimeAGreaterThanB(item.deliveryTime,item.reqMoldTime)){
+        this.$message.error('交付时间大于了要求完成日期')
+      }
+
+    },
+    isTimeAGreaterThanB(timeA, timeB) {
+      return new Date(timeA) > new Date(timeB);
+    },
+
+
     async getFactoryList(){
       this.factoryList = await getFactoryList();
     },

+ 2 - 1
vue.config.js

@@ -35,7 +35,8 @@ module.exports = {
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {