黄梓星 1 anno fa
parent
commit
455c2d25ff

+ 4 - 4
src/views/purchase/DemandSummary/index.vue

@@ -22,7 +22,7 @@
             <el-col :span="1.5">
               <el-form-item label="品类">
                 <el-select
-                v-model="queryParams.materialClassifyFourName"
+                v-model="queryParams.materialClassifyFour"
                 size="mini"
                 clearable
                 @focus="chooseTreeRefer('MATERIALCLASSIFY_PARAM', false, '选择品类')"
@@ -430,7 +430,7 @@ export default {
         rowStatus: ['1'],
         buyer: '',
         buyerName: '',
-        materialClassifyFourName: '',
+        materialClassifyFour: '',
         manufacturer: '',
         forecastClassification: '',
         periodUnit: '',
@@ -528,7 +528,7 @@ export default {
         rowStatus: ['1'],
         buyer: '',
         buyerName: '',
-        materialClassifyFourName: '',
+        materialClassifyFour: '',
         manufacturer: '',
         forecastClassification: '',
         periodUnit: '',
@@ -774,7 +774,7 @@ export default {
     },
     selectionsToInput2(selection) {
       this.classOptions.push(selection)
-      this.queryParams.materialClassifyFourName = selection.name
+      this.queryParams.materialClassifyFour = selection.name
     },
     // 搜索区物料编码
     chooseMaterial() {

+ 21 - 10
src/views/purchase/PurchaseDemandList/add.vue

@@ -71,7 +71,7 @@
           <el-form-item label="制单日期" prop="createTime">
             <el-date-picker
               v-model="basicForm.createTime"
-              :disabled="sonDisable"
+              disabled
               clearable
               type="date"
               value-format="yyyy-MM-dd"
@@ -103,11 +103,11 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
           <el-form-item label="需求客户名称">
             <el-input disabled v-model="basicForm.customerName" size="mini" style="width: 200px"></el-input>
           </el-form-item>
-        </el-col>
+        </el-col> -->
 
         <el-col :span="1.5">
           <el-form-item label="编码">
@@ -188,7 +188,7 @@
         >
           <el-table-column show-overflow-tooltip type="selection" :reserve-selection="true" fixed="left"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
-          <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
+          <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo" fixed="left">
             <template slot-scope="scope">
               {{ scope.row.rowNo = scope.$index + 1 + "0" }}
             </template>
@@ -196,7 +196,7 @@
           <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
           <el-table-column show-overflow-tooltip label="需求客户" align="center"  prop="demandCustomerName" width="180px"/>
           <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="100px"/>
-          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="220px" :render-header="addRedStar">
+          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="220px" :render-header="addRedStar" fixed="left">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :show-message="false" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @paste.native="pasteMe($event, scope, scope.$index)">
@@ -205,7 +205,7 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="物料名称" align="center"  prop="materialName" width="200px" />
+          <el-table-column show-overflow-tooltip label="物料名称" align="center"  prop="materialName" width="200px" fixed="left"/>
           <el-table-column show-overflow-tooltip label="规格" align="center"  prop="specification" />
           <el-table-column show-overflow-tooltip label="型号" align="center"  prop="model"/>
           <el-table-column show-overflow-tooltip label="单位" align="center"  prop="unitName"/>
@@ -426,7 +426,7 @@
       <div class="btn_group">
         <el-button type="primary" size="mini"  @click="jumpOA" v-if="sonPageStu == 'check' && (row.status == '1' || row.status == '2') && basicForm.flowId">审批</el-button>
         <el-button type="primary" size="mini"  @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
-        <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check'">编辑</el-button>
+        <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check' && row.status == '0'">编辑</el-button>
         <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
         <el-button type="primary" size="mini"  @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
         <el-button size="mini" plain @click="back">返回</el-button>
@@ -1309,9 +1309,20 @@ export default {
                 newLine.push(line)
                 console.log('临时数组', newLine)
               }
-              // 删除指定下标
-              this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
-              this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
+
+              if(this.basicForm.puDemandItemList.length <= 1) {
+                // 删除指定下标
+                this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
+                this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
+              } else {
+                for(let i = index , j = 0; i < this.basicForm.puDemandItemList.length; i++, j++) {
+                  this.basicForm.puDemandItemList[i].additionalSupplier = newLine[j].additionalSupplier
+                  this.basicForm.puDemandItemList[i].additionalSupplierName = newLine[j].additionalSupplierName
+                }
+                this.$refs.table.doLayout()
+                this.$modal.closeLoading();
+              }
+
             }
           }).then(() => {
             this.$refs.table.doLayout()

+ 1 - 1
src/views/purchase/transferOrder/add.vue

@@ -1353,7 +1353,7 @@
           size="mini"
           plain
           @click="editPage"
-          v-if="sonPageStu == 'check'"
+          v-if="sonPageStu == 'check' && row.status == '0'"
           >编辑</el-button
         >
         <el-button