فهرست منبع

feat:规格改为产品的规格

hmc 1 سال پیش
والد
کامیت
57cb006d87

+ 10 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleProductsVo.java

@@ -10,6 +10,16 @@ public class SaleProductsVo extends SaleProducts {
 
     private  String  materieColorNumber;
 
+    private  String productSpecifications;
+
+    public String getProductSpecifications() {
+        return productSpecifications;
+    }
+
+    public void setProductSpecifications(String productSpecifications) {
+        this.productSpecifications = productSpecifications;
+    }
+
     public String getMaterieEncoding() {
         return materieEncoding;
     }

+ 3 - 1
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="customName" column="custom_name"/>
         <result property="materieEncoding" column="materie_encoding"/>
         <result property="materieColorNumber" column="materie_color_number"/>
+        <result property="productSpecifications" column="product_specifications"/>
     </resultMap>
 
     <sql id="selectSaleProductsVo">
@@ -94,12 +95,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectSaleProductsListAndCustomInfo" parameterType="com.zkqy.business.domain.SaleProducts" resultMap="SaleProductsResultAndCustomInfo">
         SELECT
-        sp.*,cs.custom_name,m.materie_encoding,m.materie_color_number
+        sp.*,cs.custom_name,m.materie_encoding,m.materie_color_number,pd.product_specifications
         FROM
         {DBNAME}.sale_products AS sp
         INNER JOIN {DBNAME}.sale_order AS so ON sp.sale_order_no = so.sale_no
         Inner Join {DBNAME}.customer as cs ON so.sale_custom_no= cs.custom_no
         inner join   {DBNAME}.materiel as m on sp.colour_number= m.materiel_code
+        inner join   {DBNAME}.production as pd on sp.product_no= pd.product_no
         where sp.del_flag = '0' and cs.del_flag = '0' and m.del_flag = '0'
             <if test="saleProductNo != null  and saleProductNo != ''"> and sale_product_no = #{saleProductNo}</if>
             <if test="saleOrderNo != null  and saleOrderNo != ''"> and sale_order_no = #{saleOrderNo}</if>

+ 30 - 39
zkqy-ui/src/views/orderMange/planTable/fangsi.vue

@@ -77,7 +77,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing"  disabled="disabled"  v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -206,19 +206,19 @@
             <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
               <template v-slot:default="scope">
                 <!--上机变停机待机-->
-                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
+                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
                   <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
                 <!--待机可以上机-->
-                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
+                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
                   <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
                 <!--停机变上机-->
-                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
+                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
                   <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
                 <!--已完成-->
-                <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
+                <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
                   <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
               </template>
@@ -307,7 +307,7 @@ export default {
     //业务员信息
     // this.getSalesman();
     //得到排产产品信息
-    this.getProductsInfo();
+
   },
   methods: {
     //五个显示为一排
@@ -346,6 +346,7 @@ export default {
     getProductsInfo() {
       getProductsInfo().then((response) => {
         this.productsInfo = response.data;
+        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -365,18 +366,19 @@ export default {
       getMaterielInfo(queryParams).then((response) => {
         if (response.data!=null) {
           this.materiel = response.data;
+          console.log(response.data,"规格")
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
-          row.sh=this.materiel.materieColorNumber;
-          //批次
         }
       });
-      console.log(this.product.salesmanId)
-      //批号信息
+      //产品规格
+      row.currentSpecification= this.product.productSpecifications;
+      //合同号--销售单编号(以前打算存的是业务员信息后来存的是销售单编号)
       row.salesmanId=this.product.saleOrderNo;
     },
     // 新增计划产品信息
     handleAddPlan(row) {
+      this.getProductsInfo();
       this.nanInsertDialogTableVisible = true
       this.tableData2=[]
       //先清空
@@ -440,6 +442,7 @@ export default {
     },
     // 新增一行标记为可编辑
     addEditableRow() {
+      this.getProductsInfo();
       // 检查当前编辑行是否已填写完毕
       if(this.tableData2.length!=0){
         if (this.editingRowIndex !== -1 && !this.isRowFilled(this.tableData2[this.editingRowIndex])) {
@@ -514,6 +517,7 @@ export default {
     },
     // 修改产品计划
     handleEditPlan(row) {
+      this.getProductsInfo();
       //当前操作机台号
       this.machineId=row.machineId;
       this.tableData2=[];
@@ -529,22 +533,22 @@ export default {
         this.tableData2=response.data;
         console.log( this.tableData2)
         // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        this.$nextTick(() => {
-          // 获取第一个业务员选择框(假设表格只有一行)
-          this.tableDataStatus=[];
-          for (let i = 0; i < this.tableData2.length; i++) {
-            const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-            this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-            // console.log(firstSalesmanSelect,11111111)
-            // 触发 change 事件
-            if (firstSalesmanSelect) {
-              firstSalesmanSelect.$emit('change', {
-                target: {value: "ddd"},
-              });
-            }
-          }
-
-        });
+        // this.$nextTick(() => {
+        //   // 获取第一个业务员选择框(假设表格只有一行)
+        //   this.tableDataStatus=[];
+        //   for (let i = 0; i < this.tableData2.length; i++) {
+        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
+        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
+        //     // console.log(firstSalesmanSelect,11111111)
+        //     // 触发 change 事件
+        //     if (firstSalesmanSelect) {
+        //       firstSalesmanSelect.$emit('change', {
+        //         target: {value: "ddd"},
+        //       });
+        //     }
+        //   }
+        //
+        // });
       })
     },
     //弹窗里边的点击查询
@@ -572,15 +576,6 @@ export default {
     },
     //更新状态
     updateStatus(ind, row,planStatus){
-      const a=planStatus;
-      console.log( row.planStatus,this.tableDataStatus[ind].planStatus)
-      if(planStatus==this.tableDataStatus[ind].planStatus){
-        this.$message({
-          message: '并未更改状态,不会发送请求',
-          type: 'warning'
-        });
-        return;
-      }
       //先查询计划表中有没有正在上机的
       getPlanSpinningInfo({"machineId":this.machineId,"planStatus":planStatus}).then(response => {
         let i=0
@@ -606,10 +601,6 @@ export default {
                 type: 'success'
               });
               this.getSpinningPlanList();
-              this.tableDataStatus=[]
-              for (let i = 0; i < this.tableData2.length; i++) {
-                this.tableDataStatus.push({"index": i, "planStatus": this.tableData2[i].planStatus})
-              }
               //最后把弹窗关掉
               this.nanInsertDialogTableVisible=false
             } else {

+ 10 - 8
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -77,7 +77,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -111,7 +111,7 @@
             </el-table-column>
             <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
               <template v-slot:default="scope">
-                <el-select  v-model="scope.row.planStatus" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.planStatus)">
+                <el-select  v-model="scope.row.planStatus" placeholder="请选择计划状态">
                   <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
               </template>
@@ -183,10 +183,10 @@
                 <span v-else>{{ scope.row.currentColorCode }}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+            <el-table-column prop="currentSpecification"  label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing"  disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -361,6 +361,7 @@ export default {
     // 下拉框数据改变查询色号批号信息
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
+      console.log(this.productsInfo,"hhhhhh")
       this.product = this.productsInfo.find(product => product.id === selectedProduct);
       //选择的那个产品
       this.form.product=selectedProduct;
@@ -376,15 +377,16 @@ export default {
           this.materiel = response.data;
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
-          row.sh=this.materiel.materieColorNumber;
-
         }
       });
-      //色号
-      // console.log(this.materiel)
+      //产品规格
+      row.currentSpecification= this.product.productSpecifications;
+      //合同号--销售单编号(以前打算存的是业务员信息后来存的是销售单编号)
+      row.salesmanId=this.product.saleOrderNo;
     },
     // 新增计划产品信息
     handleAddPlan(row) {
+      this.getProductsInfo();
       this.nanInsertDialogTableVisible = true
       this.tableData2=[]
       //先清空

+ 10 - 13
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -79,7 +79,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -193,7 +193,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -349,7 +349,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -465,7 +465,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -487,7 +487,7 @@
 
             <el-table-column prop="currentSpindleCount" label="锭数" header-align="center" align="center">
               <template v-slot:default="scope">
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpindleCount" placeholder="请输入锭数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing"  v-model="scope.row.currentSpindleCount" placeholder="请输入锭数" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <span v-else>{{ scope.row.currentSpindleCount }}</span>
               </template>
             </el-table-column>
@@ -771,6 +771,7 @@ export default {
       //选择的那个销售产品
       this.product = this.productsInfo.find(product => product.id === selectedProduct);
       this.form.product=selectedProduct;
+      row.currentLotNumber=this.product.lotNumber;
       //通过母粒编码查询到对应的母粒信息
       let queryParams = {
         "materielCode": this.product.colourNumber
@@ -781,16 +782,12 @@ export default {
           this.materiel = response.data;
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
-          row.currentLotNumber=this.product.lotNumber;
-          // row.sh=this.materiel.materieColorNumber;
-          //批次
-          // row.currentLotNumber=this.product.lotNumber==null?"XW121":this.product.lotNumber;
         }
       });
-
-      //色号
-      // console.log(this.materiel)
-
+      //产品规格
+      row.currentSpecification= this.product.productSpecifications;
+      //合同号--销售单编号(以前打算存的是业务员信息后来存的是销售单编号)
+      row.salesmanId=this.product.saleOrderNo;
     },
     // 新增计划产品信息
     handleAddPlan(row) {

+ 6 - 9
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -77,7 +77,7 @@
             <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
-                <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
+                <el-input v-if="scope.row.isEditing" disabled="disabled" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
                 <!-- 否则显示普通文本 -->
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
@@ -183,7 +183,7 @@
                 <span v-else>{{ scope.row.currentColorCode }}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="currentSpecification" label="规格" header-align="center" align="center">
+            <el-table-column prop="currentSpecification" disabled="disabled" label="规格" header-align="center" align="center">
               <template v-slot:default="scope">
                 <!-- 如果当前行正在编辑,则显示输入框 -->
                 <el-input v-if="scope.row.isEditing" v-model="scope.row.currentSpecification" placeholder="请输入规格" @blur.stop.prevent="handleInputBlur(scope.row)">></el-input>
@@ -376,15 +376,12 @@ export default {
           this.materiel = response.data;
           //色号 母粒编码+色号
           row.currentColorCode = this.materiel.materieEncoding+"("+this.materiel.materieColorNumber+")";
-          row.sh=this.materiel.materieColorNumber;
-          //批次
-          // row.currentLotNumber=this.product.lotNumber==null?"XW121":this.product.lotNumber;
         }
       });
-
-      //色号
-      // console.log(this.materiel)
-
+      //产品规格
+      row.currentSpecification= this.product.productSpecifications;
+      //合同号--销售单编号(以前打算存的是业务员信息后来存的是销售单编号)
+      row.salesmanId=this.product.saleOrderNo;
     },
     // 新增计划产品信息
     handleAddPlan(row) {