فهرست منبع

feat: 退押审核货品信息自定义行可以手动增加

Howie 1 سال پیش
والد
کامیت
07c4bf69de
2فایلهای تغییر یافته به همراه179 افزوده شده و 139 حذف شده
  1. 1 1
      src/layout/components/Navbar.vue
  2. 178 138
      src/views/deposit_home/components/refund_list-detail.vue

+ 1 - 1
src/layout/components/Navbar.vue

@@ -16,7 +16,7 @@
           ></i>
         </el-tooltip>
       </div> -->
-      <div >
+      <div style="margin: 0 20px">
           <el-autocomplete
             v-model="pathurl"
             :fetch-suggestions="querySearchAsync"

+ 178 - 138
src/views/deposit_home/components/refund_list-detail.vue

@@ -82,12 +82,12 @@
               detailList.examineStatus == 'SAVE'
                 ? '保存'
                 : detailList.examineStatus == 'WAIT'
-                ? '待审核'
-                : detailList.examineStatus == 'OK'
-                ? '通过'
-                : detailList.examineStatus == 'FAIL'
-                ? '不通过'
-                : '关闭'
+                  ? '待审核'
+                  : detailList.examineStatus == 'OK'
+                    ? '通过'
+                    : detailList.examineStatus == 'FAIL'
+                      ? '不通过'
+                      : '关闭'
             }}
           </div>
         </el-col>
@@ -394,6 +394,22 @@
             show-summary
             :summary-method="$getSummaries"
           >
+            <el-table-column
+              fixed="left"
+              label="操作"
+              width="100"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  v-if="scope.row.isCustom && !scope.row.isSource"
+                  type="text"
+                  size="mini"
+                  @click="()=>{
+                    detailList.items.splice(scope.$index,1)
+                  }"
+                >删除</el-button>
+              </template>
+            </el-table-column>
             <template v-if="!isCustomer">
               <el-table-column align="left" label="厂编号" prop="factoryNo" min-width="160" show-overflow-tooltip>
                 <template slot-scope="scope">
@@ -416,7 +432,7 @@
               >
                 <template slot-scope="scope">
                   <template v-if="scope.row.isCustom">
-                    <el-input v-model="scope.row.materialNumber" size="mini" placeholder="请输入"  />
+                    <el-input v-model="scope.row.materialNumber" size="mini" placeholder="请输入" />
                   </template>
                   <template v-else>
                     <CopyButton :copy-text="scope.row.materialNumber" />
@@ -435,7 +451,7 @@
             >
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.materialOldNumber" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.materialOldNumber" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <CopyButton :copy-text="scope.row.materialOldNumber" />
@@ -446,7 +462,7 @@
             <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.materialName" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.materialName" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <CopyButton :copy-text="scope.row.materialName" />
@@ -457,7 +473,7 @@
             <el-table-column align="left" label="规格型号" prop="specification" min-width="300" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.specification" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.specification" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <CopyButton :copy-text="scope.row.specification" />
@@ -481,7 +497,7 @@
                 </div> -->
 
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.depositSpecification" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.depositSpecification" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <el-input
@@ -509,7 +525,7 @@
                   {{ scope.row.depositMaterialNumber }}
                 </div> -->
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.depositMaterialNumber" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.depositMaterialNumber" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <el-input
@@ -537,7 +553,7 @@
                   {{ scope.row.depositMaterialOldNumber }}
                 </div> -->
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model="scope.row.depositMaterialOldNumber" size="mini" placeholder="请输入"  />
+                  <el-input v-model="scope.row.depositMaterialOldNumber" size="mini" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <el-input
@@ -555,7 +571,7 @@
             <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.price" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.price" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.price | numToFixed }}
@@ -565,7 +581,7 @@
             <el-table-column align="right" label="数量" prop="qty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.qty" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.qty" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.qty }}
@@ -575,7 +591,7 @@
             <el-table-column align="right" label="金额" prop="totalAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.totalAmount" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.totalAmount" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.totalAmount | numToFixed }}
@@ -585,17 +601,17 @@
             <el-table-column align="right" label="销售数量" prop="salesQty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.salesQty" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.salesQty" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
-                  {{ scope.row.salesQty  }}
+                  {{ scope.row.salesQty }}
                 </template>
               </template>
             </el-table-column>
             <el-table-column align="right" label="销售金额" prop="salesAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.salesAmount" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.salesAmount" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.salesAmount | numToFixed }}
@@ -605,7 +621,7 @@
             <el-table-column align="right" label="押金数量" prop="hasSendQty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.hasSendQty" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.hasSendQty" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.hasSendQty }}
@@ -621,7 +637,7 @@
             >
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.orderHasSendQty" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.orderHasSendQty" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.orderHasSendQty }}
@@ -631,7 +647,7 @@
             <el-table-column align="right" label="押金金额" prop="depositAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.depositAmount" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.depositAmount" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   {{ scope.row.depositAmount | numToFixed }}
@@ -641,7 +657,7 @@
             <el-table-column align="right" label="合同数量" prop="contractQty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.contractQty" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.contractQty" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <el-input
@@ -660,19 +676,19 @@
             <el-table-column align="right" label="合同单价" prop="contractPrice" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 <template v-if="scope.row.isCustom">
-                  <el-input v-model.number="scope.row.contractPrice" size="mini" type="number" placeholder="请输入"  />
+                  <el-input v-model.number="scope.row.contractPrice" size="mini" type="number" placeholder="请输入" />
                 </template>
                 <template v-else>
                   <el-input
-                  v-if="title !== '详情'"
-                  v-model.number="scope.row.contractPrice"
-                  class="inpt"
-                  size="mini"
-                  clearable
-                />
-                <div v-else>
-                  {{ scope.row.contractPrice }}
-                </div>
+                    v-if="title !== '详情'"
+                    v-model.number="scope.row.contractPrice"
+                    class="inpt"
+                    size="mini"
+                    clearable
+                  />
+                  <div v-else>
+                    {{ scope.row.contractPrice }}
+                  </div>
                 </template>
 
               </template>
@@ -732,6 +748,9 @@
           </el-table>
         </div>
       </div>
+      <div v-if="!isCustomer && title != '详情'" style="margin: 20px 0">
+        <el-button type="primary" size="small" @click="addBlankLine">添加空白行</el-button>
+      </div>
     </div>
     <h3>押金货品信息</h3>
     <el-divider />
@@ -908,11 +927,11 @@
                 fit="cover"
                 :preview-src-list="[imageURL + scope.row.fileUrl]"
               />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg" />
+              <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg">
             </template>
           </el-table-column>
           <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
@@ -922,9 +941,12 @@
           </el-table-column>
           <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
-                >下载</el-button
-              >
+              <el-button
+                type="text"
+                class="textColor"
+                @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
+              >下载
+              </el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -1115,19 +1137,19 @@
                     fit="cover"
                     :preview-src-list="[imageURL + scope.row.fileUrl]"
                   />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png" />
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
                   <img
                     v-if="checkFileType(scope.row.fileUrl) == 'excel'"
                     class="file"
                     src="@/assets/common/excel.png"
-                  />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png" />
+                  >
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png">
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png">
                   <img
                     v-if="checkFileType(scope.row.fileUrl) == 'file'"
                     class="file aaa"
                     src="@/assets/common/zip.jpeg"
-                  />
+                  >
                 </template>
               </el-table-column>
               <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
@@ -1137,9 +1159,12 @@
               </el-table-column>
               <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
-                    >下载</el-button
-                  >
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
+                  >下载
+                  </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -1195,18 +1220,26 @@
         </div>
       </div>
     </div>
-    <br />
+    <br>
     <!-- 按钮 -->
     <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
     <div class="btn-group clearfix">
       <div class="fl">
         <!-- <el-button  type="primary" size="small" @click="handleEdit">保存</el-button> -->
-        <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="adoptFn"
-          >审批通过</el-button
-        >
-        <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="rejectFn"
-          >审批驳回</el-button
-        >
+        <el-button
+          v-if="detailList.examineStatus == 'WAIT'"
+          type="primary"
+          size="small"
+          @click="adoptFn"
+        >审批通过
+        </el-button>
+        <el-button
+          v-if="detailList.examineStatus == 'WAIT'"
+          type="primary"
+          size="small"
+          @click="rejectFn"
+        >审批驳回
+        </el-button>
         <el-button v-if="title == '详情'" type="primary" size="small" @click="saveFn">保存</el-button>
       </div>
     </div>
@@ -1497,9 +1530,11 @@ export default {
                         })
                     }
                   })
-                  .finally(res => {})
+                  .finally(res => {
+                  })
+              })
+              .catch(() => {
               })
-              .catch(() => {})
           } else {
             getDepositManageExamine(data)
               .then(res => {
@@ -1522,10 +1557,12 @@ export default {
                     })
                 }
               })
-              .finally(res => {})
+              .finally(res => {
+              })
           }
         })
-        .catch(() => {})
+        .catch(() => {
+        })
       // if (!this.detailList.installDate) {
       //   this.$message.error("请选择安装时间");
       //   return;
@@ -1545,7 +1582,6 @@ export default {
     },
     // 审批通过
     async adoptFn() {
-
       this.$confirm('此操作将审批订单, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -1606,9 +1642,11 @@ export default {
                         })
                     }
                   })
-                  .finally(res => {})
+                  .finally(res => {
+                  })
+              })
+              .catch(() => {
               })
-              .catch(() => {})
           } else {
             getDepositManageExamine(data)
               .then(res => {
@@ -1633,10 +1671,12 @@ export default {
                     })
                 }
               })
-              .finally(res => {})
+              .finally(res => {
+              })
           }
         })
-        .catch(() => {})
+        .catch(() => {
+        })
 
       // if (!this.detailList.installDate) {
       //   this.$message.error("请选择安装时间");
@@ -1705,85 +1745,12 @@ export default {
       if (res.data.examineStatus == 'SAVE' || res.data.examineStatus == 'OK' || res.data.examineStatus == 'FAIL') {
         this.title = '详情'
       }
-      if (!this.isCustomer && this.title != '详情') {
-        arr.push({
-          id: null,
-          parentId:this.detailId,
-          refEnginRecordNo: res.data.refEnginRecordNo,
-          specialItemNo: null,
-          specialItemNoNumber: null,
-          factoryNo: null,
-          factoryNoNumber: null,
-          specialNo: null,
-          specialNoNumber: null,
-          billNo: null,
-          billNoNumber: null,
-          materialId: null,
-          materialName: null,
-          materialNumber: null,
-          materialOldNumber: null,
-          specification: null,
-          unit: null,
-          k3CategoryId: null,
-          k3CategoryNumber: null,
-          k3CategoryName: null,
-          enginPrice: null,
-          enginTotality: null,
-          enginNum: null,
-          price: null,
-          qty: null,
-          totalAmount: null,
-          customerWalletId: null,
-          customerWalletNumber: null,
-          customerWalletName: null,
-          tax: null,
-          remark: null,
-          hasSendQty: null,
-          depositAmount: null,
-          dataQty: null,
-          diffPolicyPrice: null,
-          diffPrice: null,
-          diffAmount: null,
-          realMaterialId: null,
-          realMaterialName: null,
-          realMaterialNumber: null,
-          realMaterialOldNumber: null,
-          realSpecification: null,
-          contractQty: null,
-          contractPrice: null,
-          contractAmount: null,
-          mailFactoryDate: null,
-          mailFactoryYear: null,
-          confirmDate: null,
-          settlementNo: null,
-          settlementDate: null,
-          inFactoryDate: null,
-          inFactoryType: null,
-          salesQty: null,
-          salesAmount: null,
-          createBy: null,
-          createTime: null,
-          depositMaterialId: null,
-          depositMaterialName: null,
-          depositMaterialNumber: null,
-          depositMaterialOldNumber: null,
-          depositSpecification: null,
-          orderHasSendQty: null,
-          saleTypeId: null,
-          sums1: [],
-          sums2: [],
-          isCustom: true,
-          isSource: false
-        })
-      }
       res.data.items = arr
-
       this.amendData = res.data.dataList.filter(k => k.dataPosition == 'AMEND')
       this.original = res.data.dataList.filter(k => k.dataPosition != 'AMEND')
       res.data.realUseUnit = res.data.realUseUnit || res.data.refUseUnit
       res.data.realInstallAddress = res.data.realInstallAddress || res.data.refInstallAddress
       this.detailList = res.data
-
     },
 
     goBack() {
@@ -1853,6 +1820,77 @@ export default {
     submitGoodsScreenForm() {
       this.currentPage = 1
       this.getGoodsList()
+    },
+    addBlankLine() {
+      this.detailList.items.push({
+        id: null,
+        parentId: this.detailId,
+        refEnginRecordNo: this.detailList.refEnginRecordNo,
+        specialItemNo: null,
+        specialItemNoNumber: null,
+        factoryNo: null,
+        factoryNoNumber: null,
+        specialNo: null,
+        specialNoNumber: null,
+        billNo: null,
+        billNoNumber: null,
+        materialId: null,
+        materialName: null,
+        materialNumber: null,
+        materialOldNumber: null,
+        specification: null,
+        unit: null,
+        k3CategoryId: null,
+        k3CategoryNumber: null,
+        k3CategoryName: null,
+        enginPrice: null,
+        enginTotality: null,
+        enginNum: null,
+        price: null,
+        qty: null,
+        totalAmount: null,
+        customerWalletId: null,
+        customerWalletNumber: null,
+        customerWalletName: null,
+        tax: null,
+        remark: null,
+        hasSendQty: null,
+        depositAmount: null,
+        dataQty: null,
+        diffPolicyPrice: null,
+        diffPrice: null,
+        diffAmount: null,
+        realMaterialId: null,
+        realMaterialName: null,
+        realMaterialNumber: null,
+        realMaterialOldNumber: null,
+        realSpecification: null,
+        contractQty: null,
+        contractPrice: null,
+        contractAmount: null,
+        mailFactoryDate: null,
+        mailFactoryYear: null,
+        confirmDate: null,
+        settlementNo: null,
+        settlementDate: null,
+        inFactoryDate: null,
+        inFactoryType: null,
+        salesQty: null,
+        salesAmount: null,
+        createBy: null,
+        createTime: null,
+        depositMaterialId: null,
+        depositMaterialName: null,
+        depositMaterialNumber: null,
+        depositMaterialOldNumber: null,
+        depositSpecification: null,
+        orderHasSendQty: null,
+        saleTypeId: null,
+        sums1: [],
+        sums2: [],
+        isCustom: true,
+        isSource: false
+      })
     }
   }
 }
@@ -1863,10 +1901,12 @@ export default {
 .input {
   color: blue !important;
 }
+
 ::v-deep .input2 .el-input__inner,
 .input2 {
   color: #f00 !important;
 }
+
 .inpt {
   ::v-deep .el-input__inner {
     text-align: right;