Просмотр исходного кода

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-aps into test

yusheng 9 месяцев назад
Родитель
Сommit
3f618fba19

+ 29 - 0
src/views/productionPlan/components/unpackDialog.vue

@@ -145,6 +145,7 @@
                 v-model="scope.row.reqMoldTime"
                 type="date"
                 value-format="yyyy-MM-dd"
+                @change="changeDateTime(scope.row.reqMoldTime, scope.$index)"
               ></el-date-picker>
             </el-form-item>
           </template>
@@ -284,6 +285,7 @@
       open(row) {
         this.visible = true;
         this.formData = deepClone(row);
+        this.formData.reqMoldTime = this.formData.reqMoldTime.split(' ')[0];
         if (this.formData.splitBatch == 1) {
           this.columns[2].label = '剩余数量';
           this.requiredFormingNum = this.formData.splitResidue;
@@ -359,6 +361,33 @@
         this.custom_code = this.custom_code + 1;
       },
 
+      changeDateTime(val, index) {
+        const d1 = new Date(this.formData.reqMoldTime);
+        const d2 = new Date(val);
+
+        if (d1.getTime() < d2.getTime()) {
+          this.$confirm('所选的完成时间超过要求完成时间, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+            .then(() => {
+              // this.$message({
+              //   type: 'success',
+              //   message: '删除成功!'
+              // });
+            })
+            .catch(() => {
+              this.form.unpackList[index].reqMoldTime =
+                this.formData.reqMoldTime;
+              // this.$message({
+              //   type: 'info',
+              //   message: '已取消删除'
+              // });
+            });
+        }
+      },
+
       changeNum(index) {
         let num =
           this.formData.splitBatch == 1

+ 5 - 2
src/views/saleOrder/components/order-detail.vue

@@ -173,7 +173,7 @@
           {{ form.businessInfo.customerName }}
         </el-descriptions-item>
         <el-descriptions-item>
-          <template slot="label"> 客户代 </template>
+          <template slot="label"> 客户代 </template>
           {{ form.businessInfo.customerCode }}
         </el-descriptions-item>
         <el-descriptions-item>
@@ -304,7 +304,8 @@
           salesOrderAllProductsList: [],
           salesOrderBasicInfo: {}
         },
-        orderWeight: ''
+        orderWeight: '',
+        currentRowInfo: null
       };
     },
     computed: {
@@ -326,6 +327,7 @@
     },
     methods: {
       open(row) {
+        this.currentRowInfo = row;
         this.getDetail(row.id);
         this.orderWeight = `${row.productSumWeight}${row.weightUnit}`;
         this.visible = true;
@@ -344,6 +346,7 @@
           if (typeof res.salesOrderAllProductsList != 'string') {
             this.form.salesOrderAllProductsList = res.salesOrderAllProductsList;
           }
+          console.log('this.form', this.form);
         });
       },
       cancel() {

+ 12 - 3
src/views/saleOrder/components/plan-submit.vue

@@ -6,7 +6,14 @@
     append-to-body
   >
     <div class="main_container">
-      <el-descriptions title="" :column="3" size="medium" border label-class-name="title-col"  content-class-name="title-col">
+      <el-descriptions
+        title=""
+        :column="3"
+        size="medium"
+        border
+        label-class-name="title-col"
+        content-class-name="title-col"
+      >
         <el-descriptions-item>
           <template slot="label"> 计划编号 </template>
           {{ info.code }}
@@ -96,6 +103,8 @@
 <script>
   import { getCode } from '@/api/codeManagement';
   import dictMixins from '@/mixins/dictMixins';
+  import { debounce } from 'lodash';
+
   export default {
     mixins: [dictMixins],
     props: {
@@ -133,10 +142,10 @@
         this.loading = false;
       },
 
-      submit(type) {
+      submit: debounce(function (type) {
         this.$emit('publish', type);
         this.visible = false;
-      }
+      }, 800)
     }
   };
 </script>

+ 2 - 2
src/views/saleOrder/salesToProductionNew.vue

@@ -436,13 +436,13 @@
     },
     methods: {
       async getProducedData() {
-        console.log(3333333333333333333333333)
+        console.log(3333333333333333333333333);
         let query = this.$route.query;
         let producedList = query.producedList
           ? JSON.parse(query.producedList)
           : [];
         console.log(query, 'query');
-        console.log(producedList,'producedList');
+        console.log(producedList, 'producedList');
         // this.form.produceType = query.produceType || 2;
         if (!producedList || producedList.length === 0) {
           this.producedList = [

+ 22 - 12
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -847,6 +847,7 @@
   import { getCode } from '@/api/codeManagement';
   import dayjs from 'dayjs';
   import { debounce } from 'lodash';
+  import { log } from 'bpmn-js-token-simulation';
   export default {
     mixins: [dictMixins],
     components: {
@@ -1036,7 +1037,7 @@
       },
       async getProducedData() {
         console.log(111111111111111);
-        let query = this.$route.query;
+        let query = { ...this.$route.query };
         console.log(query, 'query');
 
         if (!query.producedList || query.producedList.length == 0) {
@@ -1051,7 +1052,7 @@
       },
       // 初始化时间赋值
       initTime() {
-        let data = this.$route.query;
+        let data = { ...this.$route.query };
         if (data.startTime) {
           this.$set(this.form, 'startTime', data.startTime);
         }
@@ -1181,7 +1182,7 @@
           if (res.length) {
             let o = res[0];
             if (type == 'init') {
-              let query = this.$route.query;
+              let query = { ...this.$route.query };
               let id = query.bomCategoryId ? query.bomCategoryId : o.id;
               this.$set(this.form, 'bomCategoryId', id);
             } else {
@@ -1209,7 +1210,7 @@
         this.form.produceVersionName = '';
         this.selectionRowShow = false; // ****
         if (type == 'init') {
-          let queryD = this.$route.query;
+          let queryD = { ...this.$route.query };
           if (queryD.produceRoutingId && !queryD.bomCategoryId) {
             this.form.produceRoutingName = queryD.produceRoutingName;
             this.form.produceRoutingId = queryD.produceRoutingId;
@@ -1252,7 +1253,6 @@
       getSaleInfo() {
         let params = JSON.parse(this.$route.query.selection);
         productionToPlan(params).then((res) => {
-          console.log(this.$route.query);
           this.form = deepClone(res);
           console.log(222222222222222222222222, '===');
           this.initTime();
@@ -1261,8 +1261,15 @@
             res.produceRoutingName || this.$route.query.produceRoutingName;
           this.form.produceRoutingId =
             res.produceRoutingId || this.$route.query.produceRoutingId;
-          this.form.factoriesId =
-            res.factoriesId || this.$route.query.factoriesId;
+
+          if (
+            !this.form.factoriesId &&
+            (res.produceRoutingId || this.$route.query.produceRoutingId)
+          ) {
+            this.form.factoriesId =
+              res.factoriesId || this.$route.query.factoriesId;
+          }
+
           // this.form.produceType =
           //   res.produceType || this.$route.query.produceType
           //     ? parseInt(this.$route.query.produceType)
@@ -1270,7 +1277,7 @@
           this.form.produceType = this.$route.query.produceType
             ? parseInt(this.$route.query.produceType)
             : res.produceType;
-          console.log(this.form.produceType, '这里吗');
+          console.log('this.form', this.form, res);
           this.changeProduceType('init');
           this.form.bomCategoryId =
             res.bomCategoryId || this.$route.query.bomCategoryId;
@@ -1344,8 +1351,9 @@
         this.$emit('cancel');
       },
       toSubmit() {
-        if (!this.form.factoriesId)
+        if (!this.form.factoriesId) {
           return this.$message.warning('请选择所属工厂');
+        }
         this.form.salesOrders.map((v) => {
           let arrTime = v.deliveryTime && v.deliveryTime.split(' ');
           let arrTimeTow =
@@ -1526,7 +1534,7 @@
         this.changeData();
       },
       addEquipment() {
-        let query = this.$route.query;
+        let query = { ...this.$route.query };
         let orderType = query.orderType;
         let arr = this.form.salesOrders;
         if (arr && arr.length > 0) {
@@ -1637,7 +1645,7 @@
 
         row.requiredFormingNum = Number(
           row.planProductNum * (this.form.marginCoefficient || 1)
-        ).toFixed(5);
+        ).toFixed(0);
       },
       confirmChoose(list) {
         // 取出在弹窗中选中并且不在表格中的数据
@@ -1758,7 +1766,9 @@
                   .catch(() => {
                     this.$message.error('发布失败,请重新发布!');
                   });
-              } catch (error) {}
+              } catch (error) {
+                this.$message.error(error.message || '发布失败,请重新发布!');
+              }
 
               loading.close();
             }

+ 6 - 5
src/views/workOrder/components/releaseDialog.vue

@@ -363,13 +363,13 @@
         tabLoading: false,
         dynamicName: '工位名称',
         form: {
-          assignType: 1,
+          assignType: '',
           crewIds: '',
           workstationIds: '',
           teamId: '',
           singleReport: '',
           workCenterId: '',
-          taskAss: 1,
+          taskAss: '',
           factoryName: '',
           factoryLineIds: ''
         },
@@ -546,6 +546,8 @@
     },
     watch: {},
     created() {
+      this.getDispatchMethod('dispatch_method');
+      this.getAssignmentMethod('assignment_method');
       // 时间计算规则code
       this.getCode();
       this.workCenterData(); // 查询工作中心
@@ -553,8 +555,6 @@
       this.queryCheckExists(); // 查询是否派单
       this.form.singleReport = this.clientEnvironmentId == 2 ? 0 : '';
       this.dateValue = this.getFormattedDate();
-      // this.getDispatchMethod('dispatch_method');
-      // this.getAssignmentMethod('assignment_method');
     },
     methods: {
       getCode() {
@@ -571,6 +571,7 @@
         await parameterGetByCode({ code }).then((res) => {
           if (res) {
             this.form.taskAss = res.value == '0' ? 0 : 1;
+            console.log(this.form.taskAss, 'this.form.taskAss');
           }
         });
       },
@@ -579,7 +580,7 @@
         await parameterGetByCode({ code }).then((res) => {
           if (res) {
             this.form.assignType =
-              res.value == '0' ? 0 : res.value == '1' ? 1 : 2;
+              res.value == '0' ? 1 : res.value == '1' ? 2 : 3;
           }
         });
       }

+ 0 - 1
src/views/workOrder/index.vue

@@ -28,7 +28,6 @@
         :datasource="datasource"
         :parse-data="parseData"
         autoAmendPage
-        cache-key="workOrderTable"
         row-key="id"
         @sort-change="onSortChange"
         @columns-change="handleColumnChange"

+ 2 - 2
vue.config.js

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

Разница между файлами не показана из-за своего большого размера
+ 123 - 123
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов