Browse Source

【修改】家用工程 经销商不能改行业类别

howie 2 years ago
parent
commit
3790b78baa

+ 149 - 75
src/views/supply/engin/components/home_examine.vue

@@ -41,7 +41,7 @@
         <el-col :span="8" class="item">
           <div class="label">行业类别</div>
           <div class="value">
-            <el-input v-model="detailData.refTradeCategory" :disabled="isCustomer" placeholder="请输入行业类别" />
+            <el-input v-model="detailData.refTradeCategory" :disabled="isDealer" placeholder="请输入行业类别" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
@@ -74,7 +74,7 @@
               placeholder="选择销售类型"
               size="small"
               style="width: 100%"
-              :disabled="detailData.examineStatus =='OK' && isDealer"
+              :disabled="detailData.examineStatus == 'OK' && isDealer"
               clearable
             >
               <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
@@ -114,7 +114,13 @@
         <el-col :span="8" class="item">
           <div class="label">保证函</div>
           <div class="value">
-            <el-select v-model="detailData.refPromiseProvide" placeholder="选择保证函状态" size="small" clearable style="width: 100%">
+            <el-select
+              v-model="detailData.refPromiseProvide"
+              placeholder="选择保证函状态"
+              size="small"
+              clearable
+              style="width: 100%"
+            >
               <el-option label="未保证" value="未保证" />
               <el-option label="已保证" value="已保证" />
             </el-select>
@@ -124,7 +130,7 @@
           <div class="label">不扣押金</div>
           <div class="value">
             <!-- {{detailData.takeDeposit ? '是':'否'}} -->
-            <el-checkbox v-model="detailData.takeDeposit">{{ detailData.takeDeposit ? '是':'否' }}</el-checkbox>
+            <el-checkbox v-model="detailData.takeDeposit">{{ detailData.takeDeposit ? '是' : '否' }}</el-checkbox>
           </div>
         </el-col>
         <el-col :span="8" class="item">
@@ -136,7 +142,14 @@
         <el-col :span="8" class="item">
           <div class="label">业务员</div>
           <div class="value">
-            <el-select v-model="detailData.serviceId" placeholder="选择业务员" size="small" filterable clearable style="width: 100%">
+            <el-select
+              v-model="detailData.serviceId"
+              placeholder="选择业务员"
+              size="small"
+              filterable
+              clearable
+              style="width: 100%"
+            >
               <el-option
                 v-for="item in salesmanList"
                 :key="item.adminUserId"
@@ -206,7 +219,6 @@
           <div class="label">引用记录</div>
           <div class="value">{{ goodsList[0] && goodsList[0].useRefCount }}</div>
         </el-col>
-
       </el-row>
     </div>
 
@@ -234,9 +246,15 @@
         <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
         <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
 
-        <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="实装规格型号"
+          prop="realSpecification"
+          min-width="300"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
+            <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
               {{ scope.row.realSpecification }}
             </div>
           </template>
@@ -267,7 +285,13 @@
         </el-table-column> -->
         <el-table-column align="left" label="现金钱包" prop="customerWalletId" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
+            <el-select
+              v-model="scope.row.customerWalletId"
+              placeholder="选择现金钱包"
+              size="small"
+              clearable
+              @change="changeXjWallet(scope.$index)"
+            >
               <el-option
                 v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
@@ -285,7 +309,13 @@
         </el-table-column> -->
         <el-table-column align="left" label="返利类型" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
+            <el-select
+              v-model="scope.row.customerWalletId2"
+              placeholder="选择返利类型"
+              size="small"
+              clearable
+              @change="changeFlWallet(scope.$index)"
+            >
               <el-option
                 v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
@@ -307,7 +337,13 @@
         </el-table-column>
         <el-table-column align="right" label="实付金额" prop="compute_sfAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100) | numToFixed }}
+            {{
+              ((scope.row.price * scope.row.qty * 100 -
+                ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 -
+                ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) /
+                100)
+                | numToFixed
+            }}
           </template>
         </el-table-column>
         <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
@@ -315,19 +351,37 @@
             {{ scope.row.isDirectTransfer ? '是' : '否' }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip />
+        <el-table-column
+          align="right"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        />
         <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
         <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
-        <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="实装物料编号"
+          prop="realMaterialNumber"
+          min-width="150"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
+            <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
               {{ scope.row.realMaterialNumber }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="实装厂产品编码"
+          prop="realMaterialOldNumber"
+          min-width="200"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
+            <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
               {{ scope.row.realMaterialOldNumber }}
             </div>
           </template>
@@ -361,12 +415,11 @@
       <div class="footer">
         <el-button type="primary" :loading="formLoading" @click="clickSubmitForm(1)">审批通过</el-button>
         <el-button type="warning" :loading="formLoading" @click="clickSubmitForm(0)">审批驳回</el-button>
-        <el-popconfirm v-if="!isCustomer" title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
+        <el-popconfirm v-if="!isCustomer" title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
     </div>
-
   </div>
 </template>
 
@@ -421,7 +474,11 @@ export default {
       handler(newValue, oldValue) {
         if (newValue && newValue.length) {
           newValue.forEach((item, index) => {
-            this.goodsList[index].compute_sfAmount = (((item.price * item.qty) * 100 - ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 - ((item.qty * (item.discAmount * 100)) / 100) * 100) / 100)
+            this.goodsList[index].compute_sfAmount =
+              (item.price * item.qty * 100 -
+                ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 -
+                ((item.qty * (item.discAmount * 100)) / 100) * 100) /
+              100
             this.goodsList[index].compute_flAmount = (item.price * item.qty * (item.rebateRate * 100)) / 100
           })
         }
@@ -459,7 +516,7 @@ export default {
       getTypeList({
         pageNum: 1,
         pageSize: -1
-      }).then((res) => {
+      }).then(res => {
         this.salesTypeList = res.data.records
       })
     },
@@ -485,7 +542,15 @@ export default {
         if (res.data.items) {
           res.data.items.forEach(item => {
             item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty', 'hasSendQty']
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'payRebateAmount', 'compute_sfAmount', 'compute_flAmount']
+            item.sums2 = [
+              'totalAmount',
+              'payAmount',
+              'price',
+              'discAmount',
+              'payRebateAmount',
+              'compute_sfAmount',
+              'compute_flAmount'
+            ]
           })
         }
         res.data.items.forEach(item => {
@@ -505,7 +570,9 @@ export default {
     // 修改返利钱包
     changeFlWallet(index) {
       if (this.goodsList[index].customerWalletId2) {
-        const obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2)
+        const obj = this.goodsList[index].rebateWallets.find(
+          o => o.customerWalletId == this.goodsList[index].customerWalletId2
+        )
         this.goodsList[index].rebateRate = obj.rebateRate
         this.goodsList[index].customerWalletName2 = obj.customerWalletName
       } else {
@@ -517,7 +584,9 @@ export default {
     // 修改现金钱包
     changeXjWallet(index) {
       if (this.goodsList[index].customerWalletId) {
-        const obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId)
+        const obj = this.goodsList[index].wallets.find(
+          o => o.customerWalletId == this.goodsList[index].customerWalletId
+        )
         this.goodsList[index].customerWalletName = obj.customerWalletName
       } else {
         this.goodsList[index].customerWalletName = ''
@@ -536,65 +605,70 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(() => {
-        const saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId)
-        const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
-        const params = JSON.parse(JSON.stringify(this.detailData))
-        params.examineNote = this.examineForm.remark
-        params.examineResult = val
-        params.refEnginRecordNo = this.detailData.refEnginRecordNo,
-        params.saleTypeId = this.detailData.saleTypeId
-        params.saleTypeCode = saleTypeItem.saleCode
-        params.saleTypeName = saleTypeItem.saleName
-        params.serviceName = saleManItem.nickName
-        this.formLoading = true
-        examineHome(params).then(res => {
-          if (!res.data) {
-            this.$successMsg()
-            this.goBack()
-            this.$parent.getList()
-          } else {
-            this.$confirm('审批成功!是否跳转下一张待审批订单?', '提示', {
-              confirmButtonText: '跳转',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.$successMsg('进入下一张待审批订单')
-              this.detailData = res.data
-              this.goodsList = res.data.items
-              this.examineForm.remark = ''
-            }).catch(() => {
-              this.goBack()
-              this.$parent.getList()
+      })
+        .then(() => {
+          const saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId)
+          const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
+          const params = JSON.parse(JSON.stringify(this.detailData))
+          params.examineNote = this.examineForm.remark
+          params.examineResult = val
+          ;(params.refEnginRecordNo = this.detailData.refEnginRecordNo),
+            (params.saleTypeId = this.detailData.saleTypeId)
+          params.saleTypeCode = saleTypeItem.saleCode
+          params.saleTypeName = saleTypeItem.saleName
+          params.serviceName = saleManItem.nickName
+          this.formLoading = true
+          examineHome(params)
+            .then(res => {
+              if (!res.data) {
+                this.$successMsg()
+                this.goBack()
+                this.$parent.getList()
+              } else {
+                this.$confirm('审批成功!是否跳转下一张待审批订单?', '提示', {
+                  confirmButtonText: '跳转',
+                  cancelButtonText: '取消',
+                  type: 'warning'
+                })
+                  .then(() => {
+                    this.$successMsg('进入下一张待审批订单')
+                    this.detailData = res.data
+                    this.goodsList = res.data.items
+                    this.examineForm.remark = ''
+                  })
+                  .catch(() => {
+                    this.goBack()
+                    this.$parent.getList()
+                  })
+              }
+            })
+            .finally(res => {
+              this.formLoading = false
             })
-          }
-        }).finally(res => {
-          this.formLoading = false
         })
-      }).catch(() => {})
+        .catch(() => {})
     }
-
   }
 }
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

File diff suppressed because it is too large
+ 645 - 114
src/views/supply/engin/components/home_form.vue


+ 360 - 150
src/views/supply/engin/components/home_return.vue

@@ -10,91 +10,97 @@
       <el-row>
         <el-col :span="8" class="item">
           <div class="label">工程订单号</div>
-          <div class="value">{{detailData.enginOrderNo}}</div>
+          <div class="value">{{ detailData.enginOrderNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">订单日期</div>
-          <div class="value">{{detailData.orderDate}}</div>
+          <div class="value">{{ detailData.orderDate }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>
-          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+          <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">经销商编码</div>
-          <div class="value">{{detailData.customerNumber}}</div>
+          <div class="value">{{ detailData.customerNumber }}</div>
         </el-col>
         <el-col :span="16" class="item">
           <div class="label">经销商名称</div>
-          <div class="value">{{detailData.customerName}}</div>
+          <div class="value">{{ detailData.customerName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">工程登录编号</div>
-          <div class="value">{{detailData.refEnginRecordNo}}</div>
+          <div class="value">{{ detailData.refEnginRecordNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">项目类别</div>
-          <div class="value">{{detailData.refProjectCategory}}</div>
+          <div class="value">{{ detailData.refProjectCategory }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">行业类别</div>
-          <div class="value">{{detailData.refTradeCategory}}</div>
+          <div class="value">
+            <el-input
+              v-model="detailData.refTradeCategory"
+              :disabled="isDealer"
+              placeholder="请输入行业类别"
+            />
+          </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">跨区厂编号</div>
-          <div class="value">{{detailData.refFactoryNo}}</div>
+          <div class="value">{{ detailData.refFactoryNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">使用单位</div>
-          <div class="value">{{detailData.refUseUnit}}</div>
+          <div class="value">{{ detailData.refUseUnit }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">购买单位</div>
-          <div class="value">{{detailData.refBuyUnitName}}</div>
+          <div class="value">{{ detailData.refBuyUnitName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">区域</div>
-          <div class="value">{{detailData.refRegionWork}}</div>
+          <div class="value">{{ detailData.refRegionWork }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">销售类型</div>
-          <div class="value">{{detailData.saleTypeName}}</div>
+          <div class="value">{{ detailData.saleTypeName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">第几次申报</div>
-          <div class="value">{{detailData.refDeclareNo}}</div>
+          <div class="value">{{ detailData.refDeclareNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">联系人</div>
-          <div class="value">{{detailData.refLinkman}}</div>
+          <div class="value">{{ detailData.refLinkman }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">固定电话</div>
-          <div class="value">{{detailData.refTel}}</div>
+          <div class="value">{{ detailData.refTel }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">移动电话</div>
-          <div class="value">{{detailData.refPhone}}</div>
+          <div class="value">{{ detailData.refPhone }}</div>
         </el-col>
         <el-col :span="16" class="item">
           <div class="label">安装地址</div>
-          <div class="value">{{detailData.refInstallAddress}}</div>
+          <div class="value">{{ detailData.refInstallAddress }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">保证函</div>
-          <div class="value">{{detailData.refPromiseProvide}}</div>
+          <div class="value">{{ detailData.refPromiseProvide }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">不扣押金</div>
-          <div class="value">{{detailData.takeDeposit ? '是':'否'}}</div>
+          <div class="value">{{ detailData.takeDeposit ? "是" : "否" }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
-          <div class="value">{{detailData.fileNo}}</div>
+          <div class="value">{{ detailData.fileNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">业务员</div>
-          <div class="value">{{detailData.serviceName}}</div>
+          <div class="value">{{ detailData.serviceName }}</div>
         </el-col>
         <!-- <el-col :span="24" class="item">
           <div class="label">格力回复</div>
@@ -107,39 +113,39 @@
 
         <el-col :span="16" class="item">
           <div class="label">项目说明</div>
-          <div class="value">{{detailData.refProjectNote}}</div>
+          <div class="value">{{ detailData.refProjectNote }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">项目类型</div>
-          <div class="value">{{detailData.refProjectType}}</div>
+          <div class="value">{{ detailData.refProjectType }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">其他附件审批意见</div>
-          <div class="value">{{detailData.refOtherAnnexIdea}}</div>
+          <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
-          <div class="value">{{detailData.geLiInerNote}}</div>
+          <div class="value">{{ detailData.geLiInerNote }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">备注</div>
-          <div class="value">{{detailData.remark}}</div>
+          <div class="value">{{ detailData.remark }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">制单人</div>
-          <div class="value">{{detailData.createName}}</div>
+          <div class="value">{{ detailData.createName }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">制单日期</div>
-          <div class="value">{{detailData.createTime}}</div>
+          <div class="value">{{ detailData.createTime }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">关闭人</div>
-          <div class="value">{{detailData.closeName}}</div>
+          <div class="value">{{ detailData.closeName }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">关闭日期</div>
-          <div class="value">{{detailData.closeTime}}</div>
+          <div class="value">{{ detailData.closeTime }}</div>
         </el-col>
       </el-row>
     </div>
@@ -158,79 +164,260 @@
         stripe
         max-height="400"
         show-summary
-        :summary-method="$getSummaries">
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-        <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip></el-table-column>
+        :summary-method="$getSummaries"
+      >
+        <el-table-column
+          align="center"
+          label="序号"
+          type="index"
+          width="50"
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="引用记录"
+          prop="useRefCount"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="物料编码"
+          prop="materialNumber"
+          min-width="120"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="产品编码"
+          prop="materialOldNumber"
+          min-width="120"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="规格型号"
+          prop="specification"
+          min-width="350"
+          show-overflow-tooltip
+        ></el-table-column>
 
-            <el-table-column align="left"  label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
-                    {{scope.row.realSpecification}}
-                </div>
-              </template>
-            </el-table-column>        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="实装规格型号"
+          prop="realSpecification"
+          min-width="300"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <div
+              :style="
+                scope.row.realSpecification != scope.row.specification
+                  ? { color: 'blue' }
+                  : ''
+              "
+            >
+              {{ scope.row.realSpecification }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="left"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="工程登录数量"
+          prop="enginNum"
+          min-width="120"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="数量"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="返利类型"
+          prop="customerWalletName2"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="使用返利金额"
+          prop="rebateAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.rebateAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="right"
+          label="格力折扣"
+          prop="discAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="现金钱包"
+          prop="customerWalletName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="实付金额"
+          prop="payAmount"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            {{ scope.row.isDirectTransfer ? "是" : "否" }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          align="right"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="可退数量"
+          prop="refundableQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="right"
+          label="退订数量"
+          prop="tdQty"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            {{ scope.row.isDirectTransfer ? '是' : '否' }}
+            <el-input
+              v-model="scope.row.tdQty"
+              size="mini"
+              @blur="hasTdQty(scope.row)"
+              type="number"
+              @mousewheel.native.prevent
+            ></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="备注"
+          prop="remark"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="left"
+          label="实装物料编号"
+          prop="realMaterialNumber"
+          min-width="150"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            <el-input v-model="scope.row.tdQty" size="mini" @blur="hasTdQty(scope.row)" type="number" @mousewheel.native.prevent></el-input>
+            <div
+              :style="
+                scope.row.realMaterialNumber != scope.row.materialNumber
+                  ? { color: 'blue' }
+                  : ''
+              "
+            >
+              {{ scope.row.realMaterialNumber }}
+            </div>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
+        <el-table-column
+          align="left"
+          label="实装厂产品编码"
+          prop="realMaterialOldNumber"
+          min-width="200"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialNumber}}
-                </div>
-              </template>
+            <div
+              :style="
+                scope.row.realMaterialOldNumber != scope.row.materialOldNumber
+                  ? { color: 'blue' }
+                  : ''
+              "
+            >
+              {{ scope.row.realMaterialOldNumber }}
+            </div>
+          </template>
         </el-table-column>
-            <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialOldNumber}}
-                </div>
-              </template>
-            </el-table-column>
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          align="left"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
       </el-table>
     </div>
 
@@ -241,28 +428,39 @@
       <el-row :gutter="0">
         <el-col :span="12" class="item">
           <div class="label">退订人</div>
-          <div class="value">{{userName}}</div>
+          <div class="value">{{ userName }}</div>
         </el-col>
         <el-col :span="12" class="item">
           <div class="label">退订日期</div>
-          <div class="value">{{getDate()}}</div>
+          <div class="value">{{ getDate() }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">退订说明</div>
-          <div class="value"><el-input v-model="returnForm.remark" placeholder="请输入退订说明"></el-input></div>
+          <div class="value">
+            <el-input
+              v-model="returnForm.remark"
+              placeholder="请输入退订说明"
+            ></el-input>
+          </div>
         </el-col>
       </el-row>
     </div>
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
-        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;"  v-if="!isDealer">
+        <el-button type="primary" @click="clickSubmitForm()"
+          >确定退订</el-button
+        >
+        <el-popconfirm
+          title="确定关闭吗?"
+          @onConfirm="goBack"
+          style="margin-left: 10px"
+          v-if="!isDealer"
+        >
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
     </div>
-
   </div>
 </template>
 
@@ -270,21 +468,21 @@
 import { getOrderDetail, returnHome } from "@/api/supply/engin";
 
 export default {
-  name: 'HomeReturn',
-  componentName: 'HomeReturn',
-  props: ['listItem'],
+  name: "HomeReturn",
+  componentName: "HomeReturn",
+  props: ["listItem"],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
-         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        // { label: '审核驳回', value: 'FAIL' },,
+        { label: "已关闭", value: "CLOSE" },
       ];
-      let obj = statusList.find(o => o.value == val);
-      return obj ? obj.label : ''
-    }
+      let obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
   data() {
     return {
@@ -293,15 +491,15 @@ export default {
 
       formLoading: false,
       returnForm: {
-        remark: '',
-      }
-    }
+        remark: "",
+      },
+    };
   },
- computed: {
+  computed: {
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
+      return JSON.parse(localStorage.getItem("supply_user")).isCustomer;
     },
- },
+  },
   created() {
     this.getDetail();
   },
@@ -314,81 +512,93 @@ export default {
       var month = date.getMonth() + 1;
       var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-          month = "0" + month;
+        month = "0" + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-          strDate = "0" + strDate;
+        strDate = "0" + strDate;
       }
       var currentdate = year + seperator1 + month + seperator1 + strDate;
       return currentdate;
     },
-    hasTdQty(row){
-      if (row.tdQty<0) {
-          row.tdQty = 0
-          this.$errorMsg('不能填负数')
-        }
-
+    hasTdQty(row) {
+      if (row.tdQty < 0) {
+        row.tdQty = 0;
+        this.$errorMsg("不能填负数");
+      }
     },
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+      this.$emit("backListFormDetail");
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({id: this.listItem.parentId}).then(res => {
-        if(res.data.items) {
-          res.data.items.forEach(item => {
-            item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty'];
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'rebateAmount'];
-          })
+      getOrderDetail({ id: this.listItem.parentId }).then((res) => {
+        if (res.data.items) {
+          res.data.items.forEach((item) => {
+            item.sums1 = [
+              "directTransferQty",
+              "qty",
+              "enginNum",
+              "refundableQty",
+              "tdQty",
+            ];
+            item.sums2 = [
+              "totalAmount",
+              "payAmount",
+              "price",
+              "discAmount",
+              "rebateAmount",
+            ];
+          });
         }
         this.detailData = res.data;
-      })
+      });
     },
 
     // 退订
     clickSubmitForm(val) {
-      this.$confirm('此操作将退订订单, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let params = {
-          enginOrderId: this.detailData.enginOrderId,
-          items: this.detailData.items,
-          refundNote: this.returnForm.remark,
-          refEnginRecordNo:this.detailData.refEnginRecordNo,
-        };
-        returnHome(params).then(res => {
-          this.$successMsg();
-          this.goBack();
-          this.$parent.getList();
+      this.$confirm("此操作将退订订单, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = {
+            enginOrderId: this.detailData.enginOrderId,
+            items: this.detailData.items,
+            refundNote: this.returnForm.remark,
+            refEnginRecordNo: this.detailData.refEnginRecordNo,
+          };
+          returnHome(params).then((res) => {
+            this.$successMsg();
+            this.goBack();
+            this.$parent.getList();
+          });
         })
-      }).catch(() => {});
+        .catch(() => {});
     },
-
-  }
-}
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>

Some files were not shown because too many files changed in this diff