Explorar el Código

feat: 退押审核货品信息增加一个自定义行

Howie hace 1 año
padre
commit
2af07ef5f9
Se han modificado 2 ficheros con 299 adiciones y 111 borrados
  1. 298 111
      src/views/deposit_home/components/refund_list-detail.vue
  2. 1 0
      vue.config.js

+ 298 - 111
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>
@@ -397,10 +397,16 @@
             <template v-if="!isCustomer">
               <el-table-column align="left" label="厂编号" prop="factoryNo" min-width="160" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <CopyButton :copy-text="scope.row.factoryNo" />
-                  <span>{{ scope.row.factoryNo }}</span>
+                  <template v-if="scope.row.isCustom">
+                    <el-input v-model="scope.row.factoryNo" size="mini" placeholder="请输入" />
+                  </template>
+                  <template v-else>
+                    <CopyButton :copy-text="scope.row.factoryNo" />
+                    <span>{{ scope.row.factoryNo }}</span>
+                  </template>
                 </template>
               </el-table-column>
+
               <el-table-column
                 align="left"
                 label="物料编码"
@@ -409,8 +415,13 @@
                 show-overflow-tooltip
               >
                 <template slot-scope="scope">
-                  <CopyButton :copy-text="scope.row.materialNumber" />
-                  <span>{{ scope.row.materialNumber }}</span>
+                  <template v-if="scope.row.isCustom">
+                    <el-input v-model="scope.row.materialNumber" size="mini" placeholder="请输入"  />
+                  </template>
+                  <template v-else>
+                    <CopyButton :copy-text="scope.row.materialNumber" />
+                    <span>{{ scope.row.materialNumber }}</span>
+                  </template>
                 </template>
               </el-table-column>
             </template>
@@ -423,20 +434,35 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.materialOldNumber" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <CopyButton :copy-text="scope.row.materialOldNumber" />
+                  <span>{{ scope.row.materialOldNumber }}</span>
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.materialName" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <CopyButton :copy-text="scope.row.materialName" />
+                  <span>{{ scope.row.materialName }}</span>
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="left" label="规格型号" prop="specification" min-width="300" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.specification" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <CopyButton :copy-text="scope.row.specification" />
+                  <span>{{ scope.row.specification }}</span>
+                </template>
               </template>
             </el-table-column>
             <el-table-column
@@ -453,13 +479,19 @@
                 >
                   {{ scope.row.depositSpecification }}
                 </div> -->
-                <el-input
-                  v-model="scope.row.depositSpecification"
-                  :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')"
-                  size="mini"
-                  readonly
-                  @click.native="getRealMaterData(scope.$index)"
-                />
+
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.depositSpecification" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <el-input
+                    v-model="scope.row.depositSpecification"
+                    :class="setColour(scope.row, 'specification', 'realSpecification', 'depositSpecification')"
+                    size="mini"
+                    readonly
+                    @click.native="getRealMaterData(scope.$index)"
+                  />
+                </template>
               </template>
             </el-table-column>
             <el-table-column
@@ -476,13 +508,18 @@
                 >
                   {{ scope.row.depositMaterialNumber }}
                 </div> -->
-                <el-input
-                  v-model="scope.row.depositMaterialNumber"
-                  :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')"
-                  size="mini"
-                  readonly
-                  @click.native="getRealMaterData(scope.$index)"
-                />
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.depositMaterialNumber" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <el-input
+                    v-model="scope.row.depositMaterialNumber"
+                    :class="setColour(scope.row, 'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')"
+                    size="mini"
+                    readonly
+                    @click.native="getRealMaterData(scope.$index)"
+                  />
+                </template>
               </template>
             </el-table-column>
             <el-table-column
@@ -499,62 +536,134 @@
                 >
                   {{ scope.row.depositMaterialOldNumber }}
                 </div> -->
-                <el-input
-                  v-model="scope.row.depositMaterialOldNumber"
-                  :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')"
-                  size="mini"
-                  readonly
-                  @click.native="getRealMaterData(scope.$index)"
-                />
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model="scope.row.depositMaterialOldNumber" size="mini" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <el-input
+                    v-model="scope.row.depositMaterialOldNumber"
+                    :class="
+                      setColour(scope.row, 'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')
+                    "
+                    size="mini"
+                    readonly
+                    @click.native="getRealMaterData(scope.$index)"
+                  />
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.price | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.price" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.price | numToFixed }}
+                </template>
+              </template>
+            </el-table-column>
+            <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="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.qty }}
+                </template>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="数量" prop="qty" min-width="160" show-overflow-tooltip />
             <el-table-column align="right" label="金额" prop="totalAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.totalAmount | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.totalAmount" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.totalAmount | numToFixed }}
+                </template>
+              </template>
+            </el-table-column>
+            <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="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.salesQty  }}
+                </template>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="销售数量" prop="salesQty" min-width="160" show-overflow-tooltip />
             <el-table-column align="right" label="销售金额" prop="salesAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.salesAmount | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.salesAmount" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.salesAmount | numToFixed }}
+                </template>
+              </template>
+            </el-table-column>
+            <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="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.hasSendQty }}
+                </template>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="押金数量" prop="hasSendQty" min-width="160" show-overflow-tooltip />
             <el-table-column
               align="right"
               label="发货数量"
               prop="orderHasSendQty"
               min-width="160"
               show-overflow-tooltip
-            />
+            >
+              <template slot-scope="scope">
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.orderHasSendQty" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.orderHasSendQty }}
+                </template>
+              </template>
+            </el-table-column>
             <el-table-column align="right" label="押金金额" prop="depositAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.depositAmount | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.depositAmount" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  {{ scope.row.depositAmount | numToFixed }}
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="right" label="合同数量" prop="contractQty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input
-                  v-if="title !== '详情'"
-                  v-model.number="scope.row.contractQty"
-                  class="inpt"
-                  size="mini"
-                  clearable
-                />
-                <div v-else>
-                  {{ scope.row.contractQty }}
-                </div>
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.contractQty" size="mini" type="number" placeholder="请输入"  />
+                </template>
+                <template v-else>
+                  <el-input
+                    v-if="title !== '详情'"
+                    v-model.number="scope.row.contractQty"
+                    class="inpt"
+                    size="mini"
+                    clearable
+                  />
+                  <div v-else>
+                    {{ scope.row.contractQty }}
+                  </div>
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="right" label="合同单价" prop="contractPrice" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input
+                <template v-if="scope.row.isCustom">
+                  <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"
@@ -564,6 +673,8 @@
                 <div v-else>
                   {{ scope.row.contractPrice }}
                 </div>
+                </template>
+
               </template>
             </el-table-column>
             <el-table-column align="right" label="合同金额" prop="contractAmount" min-width="160" show-overflow-tooltip>
@@ -575,21 +686,31 @@
             </el-table-column>
             <el-table-column align="right" label="上交资料数量" prop="dataQty" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input
-                  v-if="title !== '详情'"
-                  v-model.number.trim="scope.row.dataQty"
-                  class="inpt"
-                  size="mini"
-                  @blur="setDataQty($event, scope.row)"
-                />
-                <div v-else>
-                  {{ scope.row.dataQty }}
-                </div>
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.dataQty" size="mini" type="number" placeholder="请输入" />
+                </template>
+                <template v-else>
+                  <el-input
+                    v-if="title !== '详情'"
+                    v-model.number.trim="scope.row.dataQty"
+                    class="inpt"
+                    size="mini"
+                    @blur="setDataQty($event, scope.row)"
+                  />
+                  <div v-else>
+                    {{ scope.row.dataQty }}
+                  </div>
+                </template>
               </template>
             </el-table-column>
             <el-table-column align="right" label="收差金额" prop="diffAmount" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.diffAmount | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.diffAmount" size="mini" type="number" placeholder="请输入" />
+                </template>
+                <template v-else>
+                  {{ scope.row.diffAmount | numToFixed }}
+                </template>
               </template>
             </el-table-column>
             <el-table-column
@@ -600,7 +721,12 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.diffPolicyPrice | numToFixed }}
+                <template v-if="scope.row.isCustom">
+                  <el-input v-model.number="scope.row.diffPolicyPrice" size="mini" type="number" placeholder="请输入" />
+                </template>
+                <template v-else>
+                  {{ scope.row.diffPolicyPrice | numToFixed }}
+                </template>
               </template>
             </el-table-column>
           </el-table>
@@ -782,11 +908,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>
@@ -796,11 +922,9 @@
           </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>
@@ -991,19 +1115,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>
@@ -1013,11 +1137,9 @@
               </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>
@@ -1073,24 +1195,18 @@
         </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>
@@ -1179,9 +1295,7 @@ import {
   editManageExamine,
   getDepositManageEdit
 } from '@/api/engin_deposit/refund_list'
-import {
-  getRetailProductList
-} from '@/api/supply/engin'
+import { getRetailProductList } from '@/api/supply/engin'
 import { computeDiff } from '@/api/engin_deposit.js'
 
 export default {
@@ -1196,7 +1310,6 @@ export default {
     ...mapGetters(['name']),
     comTotal() {
       return (qty, price) => {
-        console.log(qty, price)
         return Number(qty) * Number(price)
       }
     },
@@ -1588,15 +1701,88 @@ export default {
         item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
         item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
       })
+      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: true
+        })
+      }
       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
-      if (res.data.examineStatus == 'SAVE' || res.data.examineStatus == 'OK' || res.data.examineStatus == 'FAIL') {
-        this.title = '详情'
-      }
+
     },
 
     goBack() {
@@ -1672,11 +1858,12 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
-::v-deep .input .el-input__inner, .input {
+::v-deep .input .el-input__inner,
+.input {
   color: blue !important;
 }
-::v-deep .input2  .el-input__inner, .input2 {
+::v-deep .input2 .el-input__inner,
+.input2 {
   color: #f00 !important;
 }
 .inpt {

+ 1 - 0
vue.config.js

@@ -11,6 +11,7 @@ function resolve(dir) {
 const name = defaultSettings.title || 'vue Admin Template' // page title
 
 const compress = new CompressionWebpackPlugin({
+  cache: false,
   filename: info => {
     return `${info.path}.gz${info.query}`
   },