Bladeren bron

代码修改

chen 2 jaren geleden
bovenliggende
commit
29dc239db0

+ 2 - 2
src/lang/zh.js

@@ -1,5 +1,5 @@
 export default {
-  title: '数智化生产线管理平台',
+  title: '数智化项目综合管理平台(工业版)',
   logoutTip: '退出系统, 是否继续?',
   submitText: '确定',
   cancelText: '取消',
@@ -78,7 +78,7 @@ export default {
   },
   login: {
     title: '登录 ',
-    info: '数智化生产线管理平台',
+    info: '数智化项目综合管理平台(工业版)',
     tenantId: '请输入租户ID',
     username: '请输入账号',
     password: '请输入密码',

+ 1 - 1
src/option/product/productInStock.js

@@ -8,7 +8,7 @@ export default {
   border: true,
   index: true,
   viewBtn: true,
-  selection: true,
+  selection: false,
   dialogClickModal: false,
   labelWidth:160,
   columnBtn:false,

+ 6 - 2
src/option/productBatch/product.js

@@ -25,8 +25,10 @@ export default {
     {
       label: "水冷",
       prop: "waterCooling",
-      type: "input",
+      type: "number",
       cell: true,
+      min:-20,
+      max:45,
       rules: [{
         required: true,
         message: "请填写水冷",
@@ -36,8 +38,10 @@ export default {
     {
       label: "气密",
       prop: "airtight",
-      type: "input",
+      type: "number",
       cell: true,
+      min:-2,
+      max:6,
       rules: [{
         required: true,
         message: "请填写气密",

+ 30 - 20
src/option/productBatch/productBatch.js

@@ -11,10 +11,10 @@ export default {
   selection: true,
   dialogClickModal: false,
   columnBtn:false,
-  editBtn:false,
+  editBtn:true,
   delBtn:false,
-  column: [
-    {
+  column: {
+    id:{
       label: "主键",
       prop: "id",
       type: "input",
@@ -23,7 +23,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    tenantId:{
       label: "租户ID",
       prop: "tenantId",
       type: "input",
@@ -32,7 +32,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    factoryId:{
       label: "所属工厂",
       prop: "factoryId",
       search: getStore({ name: 'userInfo' }).user_category==1,
@@ -51,7 +51,7 @@ export default {
         trigger: "blur"
       }]
     },
-    {
+    batchNo:{
       label: "批次号",
       prop: "batchNo",
       type: "input",
@@ -60,7 +60,7 @@ export default {
       editDisplay: false,
     },
     
-    {
+    clientId:{
       label: "所属客户",
       prop: "clientId",
       type: "input",
@@ -77,7 +77,7 @@ export default {
         trigger: "blur"
       }]
     },
-    {
+    productModelId:{
       label: "产品型号",
       prop: "productModelId",
       type: "input",
@@ -97,7 +97,7 @@ export default {
         trigger: "blur"
       }]
     },
-    {
+    productName:{
       label: "产品名称",
       prop: "productName",
       type: "input",
@@ -106,7 +106,17 @@ export default {
       viewDisplay: false,
       search: true,
     },
-    {
+    qrCode:{
+      label: "产品编号",
+      prop: "qrCode",
+      type: "input",
+      search: true,
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    productModel:{
       label: "产品型号",
       prop: "productModel",
       type: "input",
@@ -115,7 +125,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    orderNo:{
       label: "订单号",
       prop: "orderNo",
       type: "input",
@@ -125,7 +135,7 @@ export default {
         trigger: "blur"
       }]
     },
-    {
+    createUser:{
       label: "创建人",
       prop: "createUser",
       type: "input",
@@ -134,7 +144,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    createDept:{
       label: "创建部门",
       prop: "createDept",
       type: "input",
@@ -143,7 +153,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    createTime:{
       label: "创建时间",
       prop: "createTime",
       type: "input",
@@ -151,7 +161,7 @@ export default {
       editDisplay: false,
       viewDisplay: false,
     },
-    {
+    updateUser:{
       label: "修改人",
       prop: "updateUser",
       type: "input",
@@ -160,7 +170,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    updateTime:{
       label: "修改时间",
       prop: "updateTime",
       type: "input",
@@ -169,7 +179,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    status:{
       label: "状态",
       prop: "status",
       type: "input",
@@ -178,7 +188,7 @@ export default {
       viewDisplay: false,
       hide: true,
     },
-    {
+    isDeleted:{
       label: "是否已删除",
       prop: "isDeleted",
       type: "input",
@@ -186,12 +196,12 @@ export default {
       editDisplay: false,
       viewDisplay: false,
       hide: true,
-    }, {
+    }, details:{
       labelWidth: 0,
       label: '',
       prop: 'details',
       span: 24,
       hide: true
     }
-  ]
+  }
 }

+ 19 - 0
src/option/productModel/productModel.js

@@ -94,6 +94,25 @@ export default {
             value: 1
           }]
     },
+    {
+      label: "入库数量",
+      prop: "inStockNum",
+      type: 'select',
+          dicData: [{
+            label: '7个',
+            value: 7
+          }, {
+            label: '10个',
+            value: 10
+          }],
+      rules: [
+        {
+          required: true,
+          message: '请选择入库数量',
+          trigger: 'click',
+        },
+      ],
+    },
     {
       label: "创建人",
       prop: "createUser",

+ 1 - 1
src/option/productRework/productReworkReport.js

@@ -8,7 +8,7 @@ export default {
   border: true,
   index: true,
   viewBtn: true,
-  selection: true,
+  selection: false,
   dialogClickModal: false,
   labelWidth:160,
   columnBtn:false,

+ 1 - 0
src/styles/login.scss

@@ -61,6 +61,7 @@
   font-weight: bold;
   font-size: 30px;
   letter-spacing: 2px;
+  word-break: keep-all;
 }
 
 .login-border {

+ 44 - 1
src/views/productBatch/productBatch.vue

@@ -32,9 +32,14 @@
                    @click="handleExport">导 出
         </el-button> -->
       </template>
+      
       <template #details-form>
         <avue-crud :option="optionSub" ref="detailCrud"
                   :data="form.details">
+                  <template #qrCode-form="{row}">
+                    <el-input v-model="row.qrCode"
+                              :disabled="row.id"></el-input>
+                  </template>
                   <!-- <template slot-scope="{row,index}" slot="menu">
                     <el-button v-if="row.$cellEdit"
                               text
@@ -107,6 +112,34 @@
         return ids.join(",");
       }
     },
+    watch: {
+      // 'form.factoryId'(newValue, oldValue) {
+      //   this.$nextTick(() => {
+      //     this.form.clientId='';
+      //     this.form.productModelId='';
+      //   });
+      // }
+
+    },
+    created () {
+      let that = this;
+      this.option.column.productModelId.change= function (column) {
+          // 函数体
+          if(column.value){
+            console.log(column.item.inStockNum)
+            this.$nextTick(() => {
+              var details = [];
+              for(let i=0;i<column.item.inStockNum;i++){
+                details.push({"$cellEdit":true})
+              }
+              that.form.details = details
+            });
+            // if(!this.form.details){
+            //   this.form.details = [{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true}]
+            // }
+          }
+      };
+    },
     methods: {
       rowSave(row, done, loading) {
         this.$refs.detailCrud.$refs.cellForm.validate((valid) => {
@@ -208,6 +241,14 @@
         if (["edit", "view"].includes(type)) {
           getDetail(this.form.id).then(res => {
             this.form = res.data.data;
+            if(type == "edit"){
+              this.option.column.productModelId.disabled=true;
+              this.option.column.clientId.disabled=true;
+              this.option.column.factoryId.disabled=true;
+              this.form.details.forEach(item =>{
+                item["$cellEdit"] = true
+              })
+            }
           });
         }
         if (["add"].includes(type)) {
@@ -251,7 +292,8 @@
           productName,
           clientId,
           factoryId,
-          productModelId
+          productModelId,
+          qrCode
         } = this.query;
 
         let values = {
@@ -260,6 +302,7 @@
           productModelId: productModelId,
           clientId: clientId,
           factoryId: factoryId,
+          qrCode:qrCode,
         };
 
         getList(page.currentPage, page.pageSize, values).then(res => {

+ 1 - 1
src/views/productRework/productRework.vue

@@ -229,7 +229,7 @@
           status_: status,
         };
 
-        getList(page.currentPage, page.pageSize, values).then(res => {
+        getList(page.currentPage, page.pageSize, this.query).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
           this.data = data.records;

+ 1 - 1
src/views/productRework/productReworkReport.vue

@@ -219,7 +219,7 @@
         } = this.query;
 
         let values = {
-            qrCode_: qrCode,
+            qrCode: qrCode,
             status: status,
         };