浏览代码

修改bug

qukaidi 2 年之前
父节点
当前提交
9f1c97ddb8

+ 10 - 9
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -125,26 +125,27 @@
               </el-button>
               <el-button type="info" size="small" @click.stop="saveShipping" :disabled="detailData.status == 1">船务询价
               </el-button>
-              <el-button v-if="goodsEditShow" size="small" type="primary" @click="handleSave">保存明细</el-button>
+              <el-button v-if="goodsEditShow && detailData.status != 1" size="small" type="primary" @click="handleSave">
+                保存明细</el-button>
               <el-button v-if="goodsEditShow" size="small" @click="handleClose">关闭明细</el-button>
             </el-row>
             <el-row>
               <avue-form v-if="goodsEditShow" class="trading-form" v-model="goodsEditForm" :option="goodsEditOption">
                 <template slot="ename">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.ename" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="itemProp">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.itemProp" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="itemDescription">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.itemDescription" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="partsDescribe">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.partsDescribe" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
               </avue-form>
             </el-row>
@@ -798,6 +799,7 @@ export default {
     );
     if (this.detailData.status == 1) {
       this.option.disabled = true;
+      this.goodsEditOption.disabled = true;
     }
     if (localStorage.getItem("roleName") == "贸易") {
       this.findObject(this.tableOption.column, "purchaseCost").hide = true;
@@ -989,10 +991,8 @@ export default {
       if (row.$cellEdit) {
         return this.$message.error("请保存此行内容再操作");
       }
-      if (this.detailData.status != 1 && !row.$cellEdit) {
-        this.goodsEditShow = true
-        this.goodsEditForm = row
-      }
+      this.goodsEditShow = true
+      this.goodsEditForm = row
     },
     handleSave() {
       this.$set(this.data, this.goodsEditForm.$index, this.goodsEditForm)
@@ -1913,6 +1913,7 @@ export default {
             if (res.data.code == 200) {
               this.detailData.status = 2;
               this.option = this.$options.data().option;
+              this.goodsEditOption = this.$options.data().goodsEditOption;
               this.$refs.crud.refreshTable();
             }
           });

+ 10 - 9
src/views/exportTrade/salesContract/detailsPage.vue

@@ -152,26 +152,27 @@
               <el-button type="warning" icon="el-icon-plus" size="small"
                 :disabled="detailData.status == 1 || orderItemIds.length == 0" @click="getInvoice">生成发货单
               </el-button>
-              <el-button v-if="goodsEditShow" size="small" type="primary" @click="handleSave">保存明细</el-button>
+              <el-button v-if="goodsEditShow && detailData.status != 1" size="small" type="primary" @click="handleSave">
+                保存明细</el-button>
               <el-button v-if="goodsEditShow" size="small" @click="handleClose">关闭明细</el-button>
             </el-row>
             <el-row>
               <avue-form v-if="goodsEditShow" class="trading-form" v-model="goodsEditForm" :option="goodsEditOption">
                 <template slot="ename">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.ename" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="itemProp">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.itemProp" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="itemDescription">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.itemDescription" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
                 <template slot="partsDescribe">
                   <el-input type="textarea" size="small" v-model="goodsEditForm.partsDescribe" placeholder="请输入"
-                    @change="formEditChange(goodsEditForm)" />
+                    :disabled="detailData.status == 1" @change="formEditChange(goodsEditForm)" />
                 </template>
               </avue-form>
             </el-row>
@@ -908,6 +909,7 @@ export default {
     );
     if (this.detailData.status == 1) {
       this.option.disabled = true;
+      this.goodsEditOption.disabled = true;
       this.bankOption.disabled = true;
       this.insuranceOption.disabled = true;
       this.markOption.disabled = true;
@@ -1187,10 +1189,8 @@ export default {
       if (row.$cellEdit) {
         return this.$message.error("请保存此行内容再操作");
       }
-      if (this.detailData.status != 1 && !row.$cellEdit) {
-        this.goodsEditShow = true
-        this.goodsEditForm = row
-      }
+      this.goodsEditShow = true
+      this.goodsEditForm = row
     },
     handleSave() {
       this.$set(this.data, this.goodsEditForm.$index, this.goodsEditForm)
@@ -2064,6 +2064,7 @@ export default {
             if (res.data.code == 200) {
               this.detailData.status = 2;
               this.option = this.$options.data().option;
+              this.goodsEditOption = this.$options.data().goodsEditOption;
               this.$refs.crud.refreshTable();
             }
           });

+ 9 - 4
src/views/workManagement/main-items/detailsPage.vue

@@ -733,7 +733,8 @@ export default {
         this.goodsDescList = res.data.data
         let form = this.detailData.data
         this.form.corpId = form.corpId
-        this.form.remark=form.remarks
+        this.form.remark = form.remarks
+        this.form.cname = form.bizContent
         // this.form.corpName = form.corpName
         form.itemList.forEach(e => {
           this.goodsDescList.forEach(item => {
@@ -993,7 +994,7 @@ export default {
     dispatch(row, index) {
       if (row.id) {
         this.pgList = []
-        if (row.second>1) {
+        if (row.second > 1) {
           for (let i = 0; i < row.second; i++) {
             this.pgList.push({
               ...row,
@@ -1034,7 +1035,7 @@ export default {
       const params = {
         ...this.form,
         ...this.formTwo,
-        itemList: this.data.filter((e,index)=>index==this.pgIndex),
+        itemList: this.data.filter((e, index) => index == this.pgIndex),
         filesList: this.upLoadData
       }
       dispatch(params).then(res => {
@@ -1135,6 +1136,10 @@ export default {
             if (this.dataList[i].actualDate === (null || "")) {
               return this.$message.error(`请输入明细列表第${i + 1}行的结束`);
             }
+            if (this.dataList[i].frequency === (null || "")) {
+              return this.$message.error(`请输入明细列表第${i + 1}行的频率`);
+            }
+
           }
           this.buttonLoading = true
 
@@ -1380,7 +1385,7 @@ export default {
             secondDisable: this.secondDisable,
             frequency: item.rate,
             projectType: this.secondDisable,
-            commission:item.commission,
+            commission: item.commission,
           }
           this.$refs.crud.rowCellAdd(params);
           this.$refs.crud.rowCell(item, this.optionFrom.length - 1)