Ver Fonte

Merge branch 'feat-two' into feat-warehouse

zh há 2 anos atrás
pai
commit
9adb3c2bab

+ 216 - 30
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -80,13 +80,13 @@
             </div>
           </el-col>
           <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">格力内部资料备注</div>
-              <div class="value">{{ details.geLiInnerDataNote }}</div>
-            </el-col>
-            <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">订单格力内部备注</div>
-              <div class="value">{{ details.orderGeLiInnerNote }}</div>
-            </el-col>
+            <div class="label">格力内部资料备注</div>
+            <div class="value">{{ details.geLiInnerDataNote }}</div>
+          </el-col>
+          <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
+            <div class="label">订单格力内部备注</div>
+            <div class="value">{{ details.orderGeLiInnerNote }}</div>
+          </el-col>
           <el-col :xs="24" :sm="24" :lg="24" class="item">
             <div class="label">使用单位</div>
             <div class="value">{{ details.refUseUnit }}</div>
@@ -118,13 +118,14 @@
           <el-col :xs="24" :sm="24" :lg="8" class="item">
             <div class="label">实际使用单位</div>
             <div class="value">
-              {{ details.realUseUnit }}
+              <el-input v-model="details.realUseUnit" :readonly="isCustomer" placeholder="实际使用单位" />
             </div>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="8" class="item">
             <div class="label">实际安装地址</div>
             <div class="value">
-              {{ details.realInstallAddress }}
+              <el-input v-model="details.realInstallAddress" :readonly="isCustomer" placeholder="实际安装地址" />
+
             </div>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -136,7 +137,8 @@
           <el-col :xs="24" :sm="24" :lg="8" class="item">
             <div class="label">购买单位</div>
             <div class="value">
-              {{ details.refBuyUnitName }}
+              <el-input v-model="details.refBuyUnitName" :readonly="isCustomer" placeholder="购买单位" />
+
             </div>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -240,40 +242,52 @@
           <el-table-column
             align="left"
             label="实装规格型号"
-            prop="realSpecification"
+            prop="depositSpecification"
             min-width="300"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
-                {{ scope.row.realSpecification }}
-              </div>
+              <el-input
+                v-model="scope.row.depositSpecification"
+                :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')"
+                size="mini"
+                readonly
+                @click.native="getRealMaterData(scope.$index)"
+              />
             </template>
           </el-table-column>
           <el-table-column
             align="left"
             label="实装物料编号"
-            prop="realMaterialNumber"
+            prop="depositMaterialNumber"
             min-width="150"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
-                {{ scope.row.realMaterialNumber }}
-              </div>
+              <el-input
+                v-model="scope.row.depositMaterialNumber"
+                :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')"
+                size="mini"
+                readonly
+                @click.native="getRealMaterData(scope.$index)"
+              />
             </template>
           </el-table-column>
           <el-table-column
             align="left"
             label="实装厂产品编码"
-            prop="realMaterialOldNumber"
+            prop="depositMaterialOldNumber"
             min-width="200"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
-                {{ scope.row.realMaterialOldNumber }}
-              </div>
+              <el-input
+                v-model="scope.row.depositMaterialOldNumber"
+                :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')"
+                size="mini"
+                readonly
+                @click.native="getRealMaterData(scope.$index)"
+              />
             </template>
           </el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="160" show-overflow-tooltip />
@@ -425,7 +439,7 @@
               <span>{{ scope.row.materialOldNumber }}</span>
             </template>
           </el-table-column>
- 
+
           <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
           <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
             <template slot-scope="scope">
@@ -608,17 +622,89 @@
         </el-row>
       </el-form>
     </div>
+    <el-dialog title="添加产品" append-to-body :visible.sync="isSetMaterial" width="80%">
+      <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proNum">
+              <el-input v-model="goodsScreenForm.proNum" placeholder="请输入物料编码" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proName">
+              <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proModel">
+              <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="price1" style="display: flex">
+              <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%" />
+              <span> - </span>
+              <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetGoodsScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitGoodsScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div>
+        <el-table :data="leftGoodsList" element-loading-text="Loading" border fit stripe height="400">
+          <el-table-column align="center" width="55">
+            <template slot-scope="scope">
+              <el-radio v-model="currentRadio" :label="scope.row.id">{{ '' }}</el-radio>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="物料编码" prop="number" min-width="100" show-overflow-tooltip />
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop="materialOldNumber"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
+        </el-table>
+        <div class="pagination clearfix" style="margin-top: 10px">
+          <div class="fr">
+            <el-pagination
+              :current-page="currentPage"
+              :page-size="10"
+              background
+              layout="prev, pager, next"
+              :total="listTotal"
+              @current-change="handleTableCurrentChange"
+            />
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">取 消</el-button>
+        <el-button type="primary" @click="submitPushGoods">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { applyDeposit, geDetail, computeDiff } from '@/api/engin_deposit.js'
-
+import {
+  getRetailProductList
+} from '@/api/supply/engin'
 import imageUpload from '@/components/Common/image-upload.vue'
 import { downloadFiles, downloadPdf } from '@/utils/util'
 
-import { getFileUrl } from '@/api/common'
-
 export default {
   components: {
     imageUpload
@@ -640,17 +726,44 @@ export default {
       baseURL: '',
       fileList: [],
       details: {},
-      restrictFilename: ['结算单', '合同', '明细表', '审核表', '收据', '发票', '照片', '相片']
+      restrictFilename: ['结算单', '合同', '明细表', '审核表', '收据', '发票', '照片', '相片'],
+      goodsScreenForm: {
+        proNum: '',
+        proName: '',
+        proModel: '',
+        price1: '',
+        price2: ''
+      },
+      isSetMaterial: false,
+      currentRadio: '',
+      currentId: '',
+      leftGoodsList: [],
+      listTotal: 0,
+      currentPage: 1
     }
   },
   computed: {
     isCustomer() {
-      return this.$store.getters.customerId && this.$store.getters.customerNumber
+      return !!(this.$store.getters.customerId && this.$store.getters.customerNumber)
     },
     comTotal() {
       return (qty, price) => {
         return Number(qty) * Number(price)
       }
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
   watch: {
@@ -697,8 +810,8 @@ export default {
           item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
         })
         res.data.items = arr
-        res.data.realUseUnit =res.data.realUseUnit || res.data.refUseUnit
-          res.data.realInstallAddress =   res.data.realInstallAddress ||res.data.refInstallAddress
+        res.data.realUseUnit = res.data.realUseUnit || res.data.refUseUnit
+        res.data.realInstallAddress = res.data.realInstallAddress || res.data.refInstallAddress
         this.details = res.data
       })
     },
@@ -804,12 +917,85 @@ export default {
       } else {
         return ''
       }
+    },
+    getRealMaterData(id) {
+      this.currentId = id
+      this.isSetMaterial = true
+      this.getGoodsList()
+    },
+    // 获取商品列表
+    getGoodsList() {
+      getRetailProductList({
+        pageNum: this.currentPage,
+        pageSize: 10,
+        saleId: this.details.saleTypeId,
+        billType: 'HOME',
+        materialCode: this.goodsScreenForm.proNum,
+        materialName: this.goodsScreenForm.proName,
+        specification: this.goodsScreenForm.proModel,
+        price1: this.goodsScreenForm.price1,
+        price2: this.goodsScreenForm.price2,
+        refEnginRecordNo: '',
+        customerId: ''
+      }).then(res => {
+        this.leftGoodsList = res.data.records
+        this.listTotal = res.data.total
+      })
+    },
+    submitPushGoods() {
+      //    realMaterialId
+      // 实装金蝶物料id
+      //        realMaterialName
+      // 实装金蝶物料名称
+      //        realMaterialNumber
+      // 实装金蝶物料编码
+      //        realMaterialOldNumber
+      // 实装金蝶物料旧编码
+      //        realSpecification
+      // 实装规格型号
+      const currentData = this.leftGoodsList.find(e => e.id === this.currentRadio)
+      this.$set(this.details.items[this.currentId], 'depositMaterialId', currentData.materialId)
+      this.$set(this.details.items[this.currentId], 'depositMaterialName', currentData.materialName)
+      this.$set(this.details.items[this.currentId], 'depositMaterialNumber', currentData.materialNumber)
+      this.$set(this.details.items[this.currentId], 'depositMaterialOldNumber', currentData.materialOldNumber)
+      this.$set(this.details.items[this.currentId], 'depositSpecification', currentData.specification)
+      this.isSetMaterial = false
+    },
+    // 关闭 弹窗
+    closeDialog() {
+      this.isSetMaterial = false
+    },
+
+    // 更改列表当前页
+    handleTableCurrentChange(val) {
+      this.currentPage = val
+      this.getGoodsList()
+    },
+    // 重置筛选表单
+    resetGoodsScreenForm() {
+      this.$refs.goodsScreenForm.resetFields()
+      this.currentRadio = ''
+      this.currentPage = 1
+      this.getGoodsList()
+    },
+    // 提交筛选表单
+    submitGoodsScreenForm() {
+      this.currentPage = 1
+      this.getGoodsList()
     }
+
   }
 }
 </script>
 
 <style lang="scss" scoped>
+
+::v-deep .input .el-input__inner {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner {
+  color: #f00 !important;
+}
 .aaa {
   height: 64px;
   width: 64px;

+ 76 - 18
src/views/deposit_home/components/deposit_list-detail.vue

@@ -128,17 +128,17 @@
               </div>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
-            <div class="label">实际使用单位</div>
-            <div class="value">
-              <el-input v-model="details.realUseUnit" placeholder="实际使用单位" />
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="24" :lg="8" class="item">
-            <div class="label">实际安装地址</div>
-            <div class="value">
-              <el-input v-model="details.realInstallAddress" placeholder="实际使用单位" />
-            </div>
-          </el-col>
+              <div class="label">实际使用单位</div>
+              <div class="value">
+                <el-input v-model="details.realUseUnit" :readonly="isCustomer" placeholder="实际使用单位" />
+              </div>
+            </el-col>
+            <el-col :xs="24" :sm="24" :lg="8" class="item">
+              <div class="label">实际安装地址</div>
+              <div class="value">
+                <el-input v-model="details.realInstallAddress" :readonly="isCustomer" placeholder="实际使用单位" />
+              </div>
+            </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
               <div class="label">项目编号</div>
               <div class="value">
@@ -148,7 +148,7 @@
             <el-col :xs="24" :sm="24" :lg="8" class="item">
               <div class="label">购买单位</div>
               <div class="value">
-                <el-input v-model="details.refBuyUnitName" placeholder="实际使用单位" />
+                <el-input v-model="details.refBuyUnitName" :readonly="isCustomer" placeholder="实际使用单位" />
               </div>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -290,7 +290,7 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="left"
               label="实装规格型号"
               prop="realSpecification"
@@ -328,6 +328,45 @@
                   {{ scope.row.realMaterialOldNumber }}
                 </div>
               </template>
+            </el-table-column> -->
+            <el-table-column
+              align="left"
+              label="实装规格型号"
+              prop="depositSpecification"
+              min-width="300"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')">
+                  {{ scope.row.depositSpecification }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="left"
+              label="实装物料编号"
+              prop="depositMaterialNumber"
+              min-width="150"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')">
+                  {{ scope.row.depositMaterialNumber }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="left"
+              label="实装厂产品编码"
+              prop="depositMaterialOldNumber"
+              min-width="200"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')">
+                  {{ scope.row.depositMaterialOldNumber }}
+                </div>
+              </template>
             </el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -1065,7 +1104,21 @@ export default {
   },
   computed: {
     isCustomer() {
-      return this.$store.getters.customerId && this.$store.getters.customerNumber
+      return !!(this.$store.getters.customerId && this.$store.getters.customerNumber)
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
   created() {
@@ -1090,16 +1143,15 @@ export default {
             item.sums2 = ['totalAmount', 'diffAmount', 'price', 'depositAmount', 'contractPrice', 'contractAmount']
           })
           res.data.collectList.forEach(item => {
-
             // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
             item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
-            item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
+            item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
           })
           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
+          res.data.realUseUnit = res.data.realUseUnit || res.data.refUseUnit
+          res.data.realInstallAddress = res.data.realInstallAddress || res.data.refInstallAddress
           this.details = res.data
         })
       } else if (this.engineering == '工程订单信息') {
@@ -1188,6 +1240,12 @@ export default {
 </script>
 
 <style scoped lang="scss">
+::v-deep .input .el-input__inner, .input {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner, .input2 {
+  color: #f00 !important;
+}
 .aaa {
   height: 64px;
   width: 64px;

+ 135 - 72
src/views/deposit_home/components/deposit_replenish.vue

@@ -11,7 +11,7 @@
       <!-- <el-radio-button label="直调发货" /> -->
       <el-radio-button label="历史记录" />
     </el-radio-group>
-    <br /><br />
+    <br><br>
 
     <div v-show="engineering == '工程押金信息'">
       <div class="diy-table-1">
@@ -76,10 +76,10 @@
               <div class="label">工程差价总额</div>
               <div class="value">{{ details.depositDiffAmount }}</div>
             </el-col>
-            <el-col :xs="24" :sm="24" :lg="24" class="item" v-if="!isCustomer">
+            <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
               <div class="label">格力内部备注</div>
               <div class="value">
-                <el-input v-model="details.geLiInerNote" placeholder="格力内部备注"></el-input>
+                <el-input v-model="details.geLiInerNote" placeholder="格力内部备注" />
               </div>
             </el-col>
             <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
@@ -128,13 +128,14 @@
             <el-col :xs="24" :sm="24" :lg="8" class="item">
               <div class="label">实际使用单位</div>
               <div class="value">
-                {{ details.realUseUnit }}
+                <el-input v-model="details.realUseUnit" :readonly="isCustomer" placeholder="实际使用单位" />
               </div>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
               <div class="label">实际安装地址</div>
               <div class="value">
-                {{ details.realInstallAddress }}
+                <el-input v-model="details.realInstallAddress" :readonly="isCustomer" placeholder="实际安装地址" />
+
               </div>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -146,7 +147,7 @@
             <el-col :xs="24" :sm="24" :lg="8" class="item">
               <div class="label">购买单位</div>
               <div class="value">
-                {{ details.refBuyUnitName }}
+                <el-input v-model="details.refBuyUnitName" :readonly="isCustomer" placeholder="购买单位" />
               </div>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -240,7 +241,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.factoryNo" />
+                <CopyButton :copy-text="scope.row.factoryNo" />
                 <span>{{ scope.row.factoryNo }}</span>
               </template>
             </el-table-column>
@@ -253,13 +254,13 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specialNo" />
+                <CopyButton :copy-text="scope.row.specialNo" />
                 <span>{{ scope.row.specialNo }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
+                <CopyButton :copy-text="scope.row.materialNumber" />
                 <span>{{ scope.row.materialNumber }}</span>
               </template>
             </el-table-column>
@@ -271,23 +272,23 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
+                <CopyButton :copy-text="scope.row.materialOldNumber" />
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
+                <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="规格型号" prop="specification" min-width="300" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
+                <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="left"
               label="实装规格型号"
               prop="realSpecification"
@@ -325,6 +326,45 @@
                   {{ scope.row.realMaterialOldNumber }}
                 </div>
               </template>
+            </el-table-column> -->
+            <el-table-column
+              align="left"
+              label="实装规格型号"
+              prop="depositSpecification"
+              min-width="300"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')">
+                  {{ scope.row.depositSpecification }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="left"
+              label="实装物料编号"
+              prop="depositMaterialNumber"
+              min-width="150"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')">
+                  {{ scope.row.depositMaterialNumber }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="left"
+              label="实装厂产品编码"
+              prop="depositMaterialOldNumber"
+              min-width="200"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')">
+                  {{ scope.row.depositMaterialOldNumber }}
+                </div>
+              </template>
             </el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -478,7 +518,7 @@
                 <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-       
+
             <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
             <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -499,8 +539,13 @@
         </div>
       </div>
       <h3 class="gdzl">工程资料</h3>
-      <el-button :disabled="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn"
-        >批量下载
+      <el-button
+        :disabled="isDis"
+        class="batchDownload"
+        type="primary"
+        size="small"
+        @click="batchDownloadFn"
+      >批量下载
       </el-button>
 
       <el-divider />
@@ -529,9 +574,9 @@
                   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) == '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'"
@@ -539,13 +584,13 @@
                   style="cursor: pointer"
                   src="@/assets/common/pdf.png"
                   @click="openPdf(scope.row.fileUrl)"
-                />
+                >
 
                 <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>
@@ -555,8 +600,11 @@
             </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
+                  type="text"
+                  class="textColor"
+                  @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
+                >下载
                 </el-button>
                 <!--                <el-button-->
                 <!--                  v-if="checkFileType(scope.row.fileUrl) == 'pdf'"-->
@@ -662,19 +710,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>
@@ -684,15 +732,17 @@
               </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>
                   <el-popconfirm
                     style="margin-left: 10px"
                     title="这是一段内容确定删除吗?"
                     @onConfirm="delFile(scope.$index, scope.row.id)"
                   >
-                    <el-button type="text" slot="reference">删除</el-button>
+                    <el-button slot="reference" type="text">删除</el-button>
                   </el-popconfirm>
                 </template>
               </el-table-column>
@@ -747,7 +797,7 @@
                 <el-col :xs="12" :sm="24" :lg="24" class="item">
                   <div class="label">复核说明</div>
                   <div class="value">
-                    <input v-model="details.reviewRemark" type="text" />
+                    <input v-model="details.reviewRemark" type="text">
                   </div>
                 </el-col>
               </el-row>
@@ -759,9 +809,9 @@
         <div
           v-if="
             details.examineStatus == 'OK' ||
-            details.dataState == 'WAIT_REVIEW' ||
-            details.dataState == 'AMEND' ||
-            details.dataState == 'REVIEW'
+              details.dataState == 'WAIT_REVIEW' ||
+              details.dataState == 'AMEND' ||
+              details.dataState == 'REVIEW'
           "
         >
           <div>
@@ -837,20 +887,20 @@
           >
             <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.enginOrderNo" />
+                <CopyButton :copy-text="scope.row.enginOrderNo" />
                 <span>{{ scope.row.enginOrderNo }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip />
             <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
+                <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
+                <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
@@ -892,20 +942,20 @@
           >
             <el-table-column align="left" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.id" />
+                <CopyButton :copy-text="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="发货申请日期" prop="theTime" min-width="160" show-overflow-tooltip />
             <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
+                <CopyButton :copy-text="scope.row.materialName" />
                 <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
+                <CopyButton :copy-text="scope.row.specification" />
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
@@ -935,20 +985,20 @@
         <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="left" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.id" />
+              <CopyButton :copy-text="scope.row.id" />
               <span>{{ scope.row.id }}</span>
             </template>
           </el-table-column>
           <el-table-column align="left" label="发货申请日期" prop="orderTime" min-width="160" show-overflow-tooltip />
           <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.materialName" />
+              <CopyButton :copy-text="scope.row.materialName" />
               <span>{{ scope.row.materialName }}</span>
             </template>
           </el-table-column>
           <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <CopyButton :copyText="scope.row.specification" />
+              <CopyButton :copy-text="scope.row.specification" />
               <span>{{ scope.row.specification }}</span>
             </template>
           </el-table-column>
@@ -988,10 +1038,8 @@
             highlight-current-row
             stripe
           >
-            <el-table-column align="left" label="受理日期" prop="checkDate" min-width="160" show-overflow-tooltip>
-            </el-table-column>
-            <el-table-column align="left" label="验收人" prop="checkName" min-width="160" show-overflow-tooltip>
-            </el-table-column>
+            <el-table-column align="left" label="受理日期" prop="checkDate" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="验收人" prop="checkName" min-width="160" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="申请退押金备注
@@ -999,8 +1047,7 @@
               prop="applyNote"
               min-width="160"
               show-overflow-tooltip
-            >
-            </el-table-column>
+            />
             <el-table-column
               align="left"
               label="验收说明
@@ -1008,8 +1055,7 @@
               prop="checkNote"
               min-width="160"
               show-overflow-tooltip
-            >
-            </el-table-column>
+            />
             <el-table-column
               align="left"
               label="是否退押
@@ -1029,10 +1075,8 @@
               prop="submitName"
               min-width="160"
               show-overflow-tooltip
-            >
-            </el-table-column>
-            <el-table-column align="left" label="提交时间" prop="submitTime" min-width="160" show-overflow-tooltip>
-            </el-table-column>
+            />
+            <el-table-column align="left" label="提交时间" prop="submitTime" min-width="160" show-overflow-tooltip />
           </el-table>
         </div>
       </div>
@@ -1049,6 +1093,9 @@ import { getFileUrl } from '@/api/common'
 import imageUpload from '@/components/Common/image-upload.vue'
 
 export default {
+  components: {
+    imageUpload
+  },
   props: {
     depositManageId: {
       type: [String, Number],
@@ -1059,9 +1106,6 @@ export default {
       default: null
     }
   },
-  components: {
-    imageUpload
-  },
   data() {
     return {
       isDis: true,
@@ -1096,14 +1140,28 @@ export default {
       restrictFilename: ['结算单', '合同', '明细表', '审核表', '收据', '发票', '照片', '相片']
     }
   },
-  created() {
-    this.getDetail()
-  },
   computed: {
     isCustomer() {
-      return this.$store.getters.customerId && this.$store.getters.customerNumber
+      return !!(this.$store.getters.customerId && this.$store.getters.customerNumber)
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
+  created() {
+    this.getDetail()
+  },
   methods: {
     getDetail() {
       if (this.engineering == '工程押金信息') {
@@ -1113,7 +1171,7 @@ export default {
           } else {
             this.isDis = false
           }
-          let arr = []
+          const arr = []
           res.data.items.forEach(item => {
             if (Number(item.qty) > 0) {
               arr.push(item)
@@ -1123,16 +1181,15 @@ export default {
             item.sums2 = ['totalAmount', 'diffAmount', 'price', 'depositAmount', 'contractPrice', 'contractAmount']
           })
           res.data.collectList.forEach(item => {
-
-// item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
-item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
-item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
-})
+            // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+            item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
+            item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
+          })
           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
+          res.data.realUseUnit = res.data.realUseUnit || res.data.refUseUnit
+          res.data.realInstallAddress = res.data.realInstallAddress || res.data.refInstallAddress
           this.details = res.data
         })
       } else if (this.engineering == '工程订单信息') {
@@ -1270,6 +1327,12 @@ item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
 </script>
 
 <style scoped lang="scss">
+::v-deep .input .el-input__inner, .input {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner, .input2 {
+  color: #f00 !important;
+}
 .aaa {
   height: 64px;
   width: 64px;

+ 260 - 43
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>
@@ -140,16 +140,17 @@
             {{ detailList.refBillsExpireDate }}
           </div>
         </el-col>
+
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">实际使用单位</div>
           <div class="value">
-            <el-input v-model="detailList.realUseUnit" placeholder="请输入实际使用单位" />
+            <el-input v-model="detailList.realUseUnit" :readonly="isCustomer" placeholder="实际使用单位" />
           </div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">实际安装地址</div>
           <div class="value">
-            <el-input v-model="detailList.realInstallAddress" placeholder="请输入实际安装地址" />
+            <el-input v-model="detailList.realInstallAddress" :readonly="isCustomer" placeholder="实际使用单位" />
           </div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -161,7 +162,7 @@
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">购买单位</div>
           <div class="value">
-            <el-input v-model="detailList.refBuyUnitName" placeholder="请输入购买单位" />
+            <el-input v-model="detailList.refBuyUnitName" :readonly="isCustomer" placeholder="请输入购买单位" />
           </div>
         </el-col>
         <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
@@ -438,44 +439,76 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-
             <el-table-column
               align="left"
               label="实装规格型号"
-              prop="realSpecification"
+              prop="depositSpecification"
               min-width="300"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
-                  {{ scope.row.realSpecification }}
+                <div
+                  v-if="title=='详情'"
+                  :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')"
+                >
+                  {{ scope.row.depositSpecification }}
                 </div>
+                <el-input
+                  v-else
+                  v-model="scope.row.depositSpecification"
+                  :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')"
+                  size="mini"
+                  readonly
+                  @click.native="getRealMaterData(scope.$index)"
+                />
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装物料编号"
-              prop="realMaterialNumber"
+              prop="depositMaterialNumber"
               min-width="150"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialNumber }}
+                <div
+                  v-if="title=='详情'"
+                  :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')"
+                >
+                  {{ scope.row.depositMaterialNumber }}
                 </div>
+                <el-input
+                  v-else
+                  v-model="scope.row.depositMaterialNumber"
+                  :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')"
+                  size="mini"
+                  readonly
+                  @click.native="getRealMaterData(scope.$index)"
+                />
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装厂产品编码"
-              prop="realMaterialOldNumber"
+              prop="depositMaterialOldNumber"
               min-width="200"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialOldNumber }}
+                <div
+                  v-if="title=='详情'"
+                  :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')"
+                >
+                  {{ scope.row.depositMaterialOldNumber }}
                 </div>
+                <el-input
+                  v-else
+                  v-model="scope.row.depositMaterialOldNumber"
+                  :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')"
+                  size="mini"
+                  readonly
+                  @click.native="getRealMaterData(scope.$index)"
+                />
               </template>
             </el-table-column>
             <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip>
@@ -752,11 +785,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>
@@ -766,9 +799,11 @@
           </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>
@@ -959,19 +994,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>
@@ -981,9 +1016,11 @@
               </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>
@@ -1039,21 +1076,99 @@
         </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>
+    <el-dialog title="添加产品" append-to-body :visible.sync="isSetMaterial" width="80%">
+      <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proNum">
+              <el-input v-model="goodsScreenForm.proNum" placeholder="请输入物料编码" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proName">
+              <el-input v-model="goodsScreenForm.proName" placeholder="请输入产品名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="proModel">
+              <el-input v-model="goodsScreenForm.proModel" placeholder="请输入产品型号" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="price1" style="display: flex">
+              <el-input v-model="goodsScreenForm.price1" placeholder="请输入价格" style="width: 46%" />
+              <span> - </span>
+              <el-input v-model="goodsScreenForm.price2" placeholder="请输入价格" style="width: 46%" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetGoodsScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitGoodsScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div>
+        <el-table :data="leftGoodsList" element-loading-text="Loading" border fit stripe height="400">
+          <el-table-column align="center" width="55">
+            <template slot-scope="scope">
+              <el-radio v-model="currentRadio" :label="scope.row.id">{{ '' }}</el-radio>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="物料编码" prop="number" min-width="100" show-overflow-tooltip />
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop="materialOldNumber"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip />
+        </el-table>
+        <div class="pagination clearfix" style="margin-top: 10px">
+          <div class="fr">
+            <el-pagination
+              :current-page="currentPage"
+              :page-size="10"
+              background
+              layout="prev, pager, next"
+              :total="listTotal"
+              @current-change="handleTableCurrentChange"
+            />
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">取 消</el-button>
+        <el-button type="primary" @click="submitPushGoods">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -1067,6 +1182,9 @@ import {
   editManageExamine,
   getDepositManageEdit
 } from '@/api/engin_deposit/refund_list'
+import {
+  getRetailProductList
+} from '@/api/supply/engin'
 import { computeDiff } from '@/api/engin_deposit.js'
 
 export default {
@@ -1084,6 +1202,20 @@ export default {
         console.log(qty, price)
         return Number(qty) * Number(price)
       }
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
   data() {
@@ -1104,7 +1236,20 @@ export default {
       restrictFilename: ['结算单', '合同', '明细表', '审核表', '收据', '发票', '照片', '相片'],
       datTate: new Date(),
       amendData: [],
-      original: []
+      original: [],
+      goodsScreenForm: {
+        proNum: '',
+        proName: '',
+        proModel: '',
+        price1: '',
+        price2: ''
+      },
+      isSetMaterial: false,
+      currentRadio: '',
+      currentId: '',
+      leftGoodsList: [],
+      listTotal: 0,
+      currentPage: 1
     }
   },
   watch: {
@@ -1459,12 +1604,84 @@ export default {
 
     goBack() {
       this.$emit('setShowPage', 0)
+    },
+    getRealMaterData(id) {
+      this.currentId = id
+      this.isSetMaterial = true
+      this.getGoodsList()
+    },
+    // 获取商品列表
+    getGoodsList() {
+      getRetailProductList({
+        pageNum: this.currentPage,
+        pageSize: 10,
+        saleId: this.detailList.saleTypeId,
+        billType: 'HOME',
+        materialCode: this.goodsScreenForm.proNum,
+        materialName: this.goodsScreenForm.proName,
+        specification: this.goodsScreenForm.proModel,
+        price1: this.goodsScreenForm.price1,
+        price2: this.goodsScreenForm.price2,
+        refEnginRecordNo: '',
+        customerId: ''
+      }).then(res => {
+        this.leftGoodsList = res.data.records
+        this.listTotal = res.data.total
+      })
+    },
+    submitPushGoods() {
+      //    realMaterialId
+      // 实装金蝶物料id
+      //        realMaterialName
+      // 实装金蝶物料名称
+      //        realMaterialNumber
+      // 实装金蝶物料编码
+      //        realMaterialOldNumber
+      // 实装金蝶物料旧编码
+      //        realSpecification
+      // 实装规格型号
+      const currentData = this.leftGoodsList.find(e => e.id === this.currentRadio)
+      this.$set(this.detailList.items[this.currentId], 'depositMaterialId', currentData.materialId)
+      this.$set(this.detailList.items[this.currentId], 'depositMaterialName', currentData.materialName)
+      this.$set(this.detailList.items[this.currentId], 'depositMaterialNumber', currentData.materialNumber)
+      this.$set(this.detailList.items[this.currentId], 'depositMaterialOldNumber', currentData.materialOldNumber)
+      this.$set(this.detailList.items[this.currentId], 'depositSpecification', currentData.specification)
+      this.isSetMaterial = false
+    },
+    // 关闭 弹窗
+    closeDialog() {
+      this.isSetMaterial = false
+    },
+
+    // 更改列表当前页
+    handleTableCurrentChange(val) {
+      this.currentPage = val
+      this.getGoodsList()
+    },
+    // 重置筛选表单
+    resetGoodsScreenForm() {
+      this.$refs.goodsScreenForm.resetFields()
+      this.currentRadio = ''
+      this.currentPage = 1
+      this.getGoodsList()
+    },
+    // 提交筛选表单
+    submitGoodsScreenForm() {
+      this.currentPage = 1
+      this.getGoodsList()
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
+
+::v-deep .input .el-input__inner, .input {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner, .input2 {
+  color: #f00 !important;
+}
 .inpt {
   ::v-deep .el-input__inner {
     text-align: right;

+ 192 - 169
src/views/deposit_home/components/refund_reexamine.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>
@@ -135,35 +135,35 @@
           <div class="value">{{ detailList.refInstallAddress }}</div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">登录有效期</div>
-              <div class="value">
-                {{ detailList.refBillsExpireDate }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际使用单位</div>
-              <div class="value">
-                {{ detailList.realUseUnit }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际安装地址</div>
-              <div class="value">
-                {{ detailList.realInstallAddress }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">项目编号</div>
-              <div class="value">
-                {{ detailList.refProjectNo }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">购买单位</div>
-              <div class="value">
-                {{ detailList.refBuyUnitName }}
-              </div>
-            </el-col>
+          <div class="label">登录有效期</div>
+          <div class="value">
+            {{ detailList.refBillsExpireDate }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际使用单位</div>
+          <div class="value">
+            {{ detailList.realUseUnit }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际安装地址</div>
+          <div class="value">
+            {{ detailList.realInstallAddress }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">项目编号</div>
+          <div class="value">
+            {{ detailList.refProjectNo }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">购买单位</div>
+          <div class="value">
+            {{ detailList.refBuyUnitName }}
+          </div>
+        </el-col>
         <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
             <div class="label">工程订单号</div>
             <div class="value">{{ detailList.customerName }}</div>
@@ -213,13 +213,13 @@
           </div>
         </el-col>
         <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">格力内部资料备注</div>
-              <div class="value">{{ detailList.geLiInnerDataNote }}</div>
-            </el-col>
-            <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">订单格力内部备注</div>
-              <div class="value">{{ detailList. orderGeLiInnerNote }}</div>
-            </el-col>
+          <div class="label">格力内部资料备注</div>
+          <div class="value">{{ detailList.geLiInnerDataNote }}</div>
+        </el-col>
+        <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">订单格力内部备注</div>
+          <div class="value">{{ detailList. orderGeLiInnerNote }}</div>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">提交保证函</div>
           <!-- <div class="value">{{ detailList.remark }}</div> -->
@@ -461,39 +461,39 @@
             <el-table-column
               align="left"
               label="实装规格型号"
-              prop="realSpecification"
+              prop="depositSpecification"
               min-width="300"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
-                  {{ scope.row.realSpecification }}
+                <div :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')">
+                  {{ scope.row.depositSpecification }}
                 </div>
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装物料编号"
-              prop="realMaterialNumber"
+              prop="depositMaterialNumber"
               min-width="150"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialNumber }}
+                <div :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')">
+                  {{ scope.row.depositMaterialNumber }}
                 </div>
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装厂产品编码"
-              prop="realMaterialOldNumber"
+              prop="depositMaterialOldNumber"
               min-width="200"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialOldNumber }}
+                <div :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')">
+                  {{ scope.row.depositMaterialOldNumber }}
                 </div>
               </template>
             </el-table-column>
@@ -597,101 +597,101 @@
       </div>
     </div>
     <h3>押金货品信息</h3>
-      <el-divider />
-      <!-- 列表 -->
-      <div class="mymain-container">
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="detailList.collectList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-            show-summary
-            :summary-method="$getSummaries"
-          >
-            <el-table-column align="left" label="工程登录单号" prop="refEnginRecordNo" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.refEnginRecordNo" />
-                <span>{{ scope.row.refEnginRecordNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.unit" />
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletName" />
-                <span>{{ scope.row.customerWalletName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包编码" prop="customerWalletNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletNumber" />
-                <span>{{ scope.row.customerWalletNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型名称" prop="k3CategoryName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryName" />
-                <span>{{ scope.row.k3CategoryName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型编码" prop="k3CategoryNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryNumber" />
-                <span>{{ scope.row.k3CategoryNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料旧编码" prop="materialOldNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
+    <el-divider />
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="detailList.collectList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          show-summary
+          :summary-method="$getSummaries"
+        >
+          <el-table-column align="left" label="工程登录单号" prop="refEnginRecordNo" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.refEnginRecordNo" />
+              <span>{{ scope.row.refEnginRecordNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.specification" />
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.unit" />
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletName" />
+              <span>{{ scope.row.customerWalletName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="现金钱包编码" prop="customerWalletNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletNumber" />
+              <span>{{ scope.row.customerWalletNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料类型名称" prop="k3CategoryName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryName" />
+              <span>{{ scope.row.k3CategoryName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料类型编码" prop="k3CategoryNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryNumber" />
+              <span>{{ scope.row.k3CategoryNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料旧编码" prop="materialOldNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialOldNumber" />
+              <span>{{ scope.row.materialOldNumber }}</span>
+            </template>
+          </el-table-column>
 
-            <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
-            <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.price | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="已退押金金额" prop="refundDepositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.refundDepositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.depositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
+          <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
+          <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.price | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="已退押金金额" prop="refundDepositAmount" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.refundDepositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.depositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+        </el-table>
       </div>
+    </div>
     <h3 class="gdzl">工程资料</h3>
     <!--    <el-button :readonly="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn"-->
     <!--      >批量下载</el-button-->
@@ -723,11 +723,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>
@@ -737,9 +737,11 @@
           </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>
@@ -927,19 +929,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>
@@ -949,9 +951,11 @@
               </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>
@@ -1004,7 +1008,7 @@
               <el-col :xs="12" :sm="24" :lg="24" class="item">
                 <div class="label">复核说明</div>
                 <div class="value">
-                  <el-input v-model="detailList.reviewRemark" type="text"></el-input>
+                  <el-input v-model="detailList.reviewRemark" type="text" />
                 </div>
               </el-col>
             </el-row>
@@ -1012,7 +1016,7 @@
         </div>
       </div>
     </div>
-    <br />
+    <br>
 
     <!-- 按钮 -->
     <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
@@ -1056,6 +1060,20 @@ export default {
         console.log(qty, price)
         return Number(qty) * Number(price)
       }
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
   data() {
@@ -1202,16 +1220,15 @@ export default {
         ]
       })
       res.data.collectList.forEach(item => {
-
-// item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
-item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
-item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
-})
+        // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+        item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
+        item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
+      })
       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
+      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') {
@@ -1226,6 +1243,12 @@ item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
 </script>
 
 <style lang="scss" scoped>
+::v-deep .input .el-input__inner, .input {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner, .input2 {
+  color: #f00 !important;
+}
 .inpt {
   ::v-deep .el-input__inner {
     text-align: right;

+ 192 - 169
src/views/deposit_home/components/refund_replenish.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>
@@ -135,35 +135,35 @@
           <div class="value">{{ detailList.refInstallAddress }}</div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">登录有效期</div>
-              <div class="value">
-                {{ detailList.refBillsExpireDate }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际使用单位</div>
-              <div class="value">
-                {{ detailList.realUseUnit }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际安装地址</div>
-              <div class="value">
-                {{ detailList.realInstallAddress }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">项目编号</div>
-              <div class="value">
-                {{ detailList.refProjectNo }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">购买单位</div>
-              <div class="value">
-                {{ detailList.refBuyUnitName }}
-              </div>
-            </el-col>
+          <div class="label">登录有效期</div>
+          <div class="value">
+            {{ detailList.refBillsExpireDate }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际使用单位</div>
+          <div class="value">
+            {{ detailList.realUseUnit }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际安装地址</div>
+          <div class="value">
+            {{ detailList.realInstallAddress }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">项目编号</div>
+          <div class="value">
+            {{ detailList.refProjectNo }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">购买单位</div>
+          <div class="value">
+            {{ detailList.refBuyUnitName }}
+          </div>
+        </el-col>
         <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
             <div class="label">工程订单号</div>
             <div class="value">{{ detailList.customerName }}</div>
@@ -213,13 +213,13 @@
           </div>
         </el-col>
         <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">格力内部资料备注</div>
-              <div class="value">{{ detailList.geLiInnerDataNote }}</div>
-            </el-col>
-            <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">订单格力内部备注</div>
-              <div class="value">{{ detailList. orderGeLiInnerNote }}</div>
-            </el-col>
+          <div class="label">格力内部资料备注</div>
+          <div class="value">{{ detailList.geLiInnerDataNote }}</div>
+        </el-col>
+        <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">订单格力内部备注</div>
+          <div class="value">{{ detailList. orderGeLiInnerNote }}</div>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">提交保证函</div>
           <!-- <div class="value">{{ detailList.remark }}</div> -->
@@ -461,39 +461,39 @@
             <el-table-column
               align="left"
               label="实装规格型号"
-              prop="realSpecification"
+              prop="depositSpecification"
               min-width="300"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
-                  {{ scope.row.realSpecification }}
+                <div :class="setColour(scope.row,'specification', 'realSpecification', 'depositSpecification')">
+                  {{ scope.row.depositSpecification }}
                 </div>
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装物料编号"
-              prop="realMaterialNumber"
+              prop="depositMaterialNumber"
               min-width="150"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialNumber }}
+                <div :class="setColour(scope.row,'materialNumber', 'realMaterialNumber', 'depositMaterialNumber')">
+                  {{ scope.row.depositMaterialNumber }}
                 </div>
               </template>
             </el-table-column>
             <el-table-column
               align="left"
               label="实装厂产品编码"
-              prop="realMaterialOldNumber"
+              prop="depositMaterialOldNumber"
               min-width="200"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
-                  {{ scope.row.realMaterialOldNumber }}
+                <div :class="setColour(scope.row,'materialOldNumber', 'realMaterialOldNumber', 'depositMaterialOldNumber')">
+                  {{ scope.row.depositMaterialOldNumber }}
                 </div>
               </template>
             </el-table-column>
@@ -597,101 +597,101 @@
       </div>
     </div>
     <h3>押金货品信息</h3>
-      <el-divider />
-      <!-- 列表 -->
-      <div class="mymain-container">
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="detailList.collectList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-            show-summary
-            :summary-method="$getSummaries"
-          >
-            <el-table-column align="left" label="工程登录单号" prop="refEnginRecordNo" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.refEnginRecordNo" />
-                <span>{{ scope.row.refEnginRecordNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.unit" />
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletName" />
-                <span>{{ scope.row.customerWalletName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包编码" prop="customerWalletNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletNumber" />
-                <span>{{ scope.row.customerWalletNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型名称" prop="k3CategoryName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryName" />
-                <span>{{ scope.row.k3CategoryName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型编码" prop="k3CategoryNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryNumber" />
-                <span>{{ scope.row.k3CategoryNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料旧编码" prop="materialOldNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
+    <el-divider />
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="detailList.collectList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          show-summary
+          :summary-method="$getSummaries"
+        >
+          <el-table-column align="left" label="工程登录单号" prop="refEnginRecordNo" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.refEnginRecordNo" />
+              <span>{{ scope.row.refEnginRecordNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.specification" />
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.unit" />
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletName" />
+              <span>{{ scope.row.customerWalletName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="现金钱包编码" prop="customerWalletNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletNumber" />
+              <span>{{ scope.row.customerWalletNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料类型名称" prop="k3CategoryName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryName" />
+              <span>{{ scope.row.k3CategoryName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料类型编码" prop="k3CategoryNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryNumber" />
+              <span>{{ scope.row.k3CategoryNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料旧编码" prop="materialOldNumber" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialOldNumber" />
+              <span>{{ scope.row.materialOldNumber }}</span>
+            </template>
+          </el-table-column>
 
-            <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
-            <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.price | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="已退押金金额" prop="refundDepositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.refundDepositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.depositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
+          <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
+          <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.price | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="已退押金金额" prop="refundDepositAmount" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.refundDepositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.depositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+        </el-table>
       </div>
+    </div>
     <h3 class="gdzl">工程资料</h3>
     <!--    <el-button :readonly="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn"-->
     <!--      >批量下载</el-button-->
@@ -723,11 +723,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>
@@ -737,9 +737,11 @@
           </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>
@@ -920,15 +922,15 @@
                   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) == '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>
@@ -938,9 +940,11 @@
             </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>
@@ -994,7 +998,7 @@
               <el-col :xs="12" :sm="24" :lg="24" class="item">
                 <div class="label">复核说明</div>
                 <div class="value">
-                  <input v-model="detailList.reviewRemark" type="text" />
+                  <input v-model="detailList.reviewRemark" type="text">
                 </div>
               </el-col>
             </el-row>
@@ -1059,7 +1063,7 @@
         </div>
       </div>
     </div>
-    <br />
+    <br>
 
     <!-- 按钮 -->
     <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
@@ -1106,6 +1110,20 @@ export default {
         console.log(qty, price)
         return Number(qty) * Number(price)
       }
+    },
+    setColour() {
+      return (row, oldValue, newValue, mostNewValue) => {
+        let myCalss = ''
+        if (row[newValue] !== row[oldValue]) {
+          myCalss = 'input'
+        }
+        if (row[mostNewValue] !== row[newValue]) {
+          myCalss = 'input2'
+        }
+        console.log(row, 9999, myCalss)
+
+        return myCalss
+      }
     }
   },
   data() {
@@ -1443,16 +1461,15 @@ export default {
         ]
       })
       res.data.collectList.forEach(item => {
-
-// item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
-item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
-item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
-})
+        // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+        item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
+        item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
+      })
       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
+      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 = '详情'
@@ -1496,6 +1513,12 @@ item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
 </script>
 
 <style lang="scss" scoped>
+::v-deep .input .el-input__inner, .input {
+  color: blue !important;
+}
+::v-deep .input2  .el-input__inner, .input2 {
+  color: #f00 !important;
+}
 .inpt {
   ::v-deep .el-input__inner {
     text-align: right;

+ 70 - 39
src/views/sales_policy/components/AddPolicy.vue

@@ -299,14 +299,14 @@
               <template slot-scope="scope">
                 <template v-if="scope.row.fang">
                   <template v-for="(item, index) in scope.row.walletRelaList">
-                    <el-tag v-if="item.type === 'REBATE'" :key="index" size="mini">
+                    <el-tag v-if="item.type === 'REBATE'" :key="index" style="margin: 5px" type="success" size="mini">
                       {{ item.walletName }}
                     </el-tag>
                   </template>
                 </template>
                 <template v-else>
                   <el-select
-                    v-if="!priceList2.length"
+                    v-if="!rebateList2.length"
                     v-model="scope.row.rebateWalletIds"
                     size="mini"
                     multiple
@@ -344,14 +344,14 @@
               <template slot-scope="scope">
                 <template v-if="scope.row.fang">
                   <template v-for="(item, index) in scope.row.walletRelaList">
-                    <el-tag v-if="item.type === 'COMMONLY'" :key="index" size="mini">
+                    <el-tag v-if="item.type === 'COMMONLY'" :key="index" style="margin: 5px" type="success" size="mini">
                       {{ item.walletName }}
                     </el-tag>
                   </template>
                 </template>
                 <template v-else>
                   <el-select
-                    v-if="!priceList2.length"
+                    v-if="!NoRebateWalletList2.length"
                     v-model="scope.row.walletIds"
                     size="mini"
                     multiple
@@ -402,7 +402,7 @@
                 <el-button
                   type="text"
                   class="textColor el-popover-left"
-                  @click="handleEdit(scope.row)"
+                  @click="handleEdit(scope.row, scope.$index)"
                 >编辑</el-button>
                 <el-popconfirm
                   confirm-button-text="好的"
@@ -643,9 +643,9 @@ export default {
         this.$successMsg(status ? '启用' : '作废')
       })
     },
-    handleEdit(row) {
+    handleEdit(row, index) {
       row.fang = !row.fang
-      !row.fang && this.handleWallet(row)
+      !row.fang && this.handleWallet(row, index)
       // this.$nextTick(() => {
       //   this.$refs.plTable.doLayout()
       // })
@@ -659,35 +659,47 @@ export default {
           const NoRebateWalletListId = []
           this.priceList.forEach(k => {
             if (k.priceTypeId === e) {
-              this.NoRebateWalletList2.push(
-                {
-                  id: k.walletId,
-                  name: k.walletName
-                }
-              )
-              this.rebateList2.push({
-                walletRebateId: k.walletId2,
-                name: k.walletName2
-              })
-              NoRebateWalletListId.push(k.walletId)
-              rebateListId.push(k.walletId2)
+              if (k.walletId) {
+                this.NoRebateWalletList2.push(
+                  {
+                    id: k.walletId,
+                    name: k.walletName
+                  }
+                )
+                NoRebateWalletListId.push(k.walletId)
+              }
+              if (k.walletId2) {
+                this.rebateList2.push({
+                  walletRebateId: k.walletId2,
+                  name: k.walletName2
+                })
+                rebateListId.push(k.walletId2)
+              }
             }
           })
-          if (NoRebateWalletListId.length && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
-            this.importWallet.walletId && this.NoRebateWalletList2.push(this.importWallet)
+          if (NoRebateWalletListId.length && this.importWallet.id && !~NoRebateWalletListId.indexOf(this.importWallet.id)) {
+            this.NoRebateWalletList2.push(this.importWallet)
+            NoRebateWalletListId.push(this.importWallet.id)
           }
-          if (rebateListId.length && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
-            this.importRebate.walletRebateId && this.rebateList2.push(this.importRebate)
+          if (rebateListId.length && this.importRebate.walletRebateId && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
+            this.rebateList2.push(this.importRebate)
+            rebateListId.push(this.importRebate.walletRebateId)
           }
           const item = this.priceList.find(k => k.priceTypeId === e)
           this.dataList[index][name] = item.priceTypeName
           this.$set(row, 'walletIds', [])
+          this.$set(row, 'rebateWalletIds', [])
+          this.dataList[index].walletIds = []
+          this.dataList[index].rebateWalletIds = []
           if (item.walletId) {
-            this.$set(row, 'walletIds', [...row.walletIds, item.walletId])
+            this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
+            this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
           }
           if (item.walletId2) {
-            this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, item.walletId2])
+            this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
+            this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
           }
+          console.log(this.dataList, row, 7868687)
           return
         }
         this.dataList[index][name] = row[name]
@@ -697,6 +709,8 @@ export default {
         this.dataList[index][name] = ''
         this.$set(row, 'walletIds', [])
         this.$set(row, 'rebateWalletIds', [])
+        this.dataList[index].walletIds = []
+        this.dataList[index].rebateWalletIds = []
       }
     },
     // 下载excel模板
@@ -826,6 +840,12 @@ export default {
       this.$set(row, 'saleTypeName', item.saleName)
       this.$set(row, 'priceType', '')
       this.priceList = []
+      this.rebateList2 = []
+      this.NoRebateWalletList2 = []
+      this.$set(row, 'walletIds', [])
+      this.$set(row, 'rebateWalletIds', [])
+      this.dataList[index].walletIds = []
+      this.dataList[index].rebateWalletIds = []
       // this.$set(row,'saleTypeId',item.id)
     },
     // 修改条件名称
@@ -1089,6 +1109,7 @@ export default {
           return
         }
       }
+
       savePolicy(this.dataList)
         .then(res => {
           this.dataList = []
@@ -1146,7 +1167,9 @@ export default {
         ]
       }).then(res => {
         this.priceList = res.data.records
-        this.priceList2 = this.quChong(res.data.records, 'priceTypeId')
+        if (res.data.records && res.data.records.length) {
+          this.priceList2 = this.quChong(res.data.records, 'priceTypeId')
+        }
         return Promise.resolve()
       })
     },
@@ -1168,7 +1191,7 @@ export default {
       }
       return result
     },
-    handleWallet(row) {
+    handleWallet(row, index) {
       if (row.saleTypeCode) {
         this.getPriceSalesRelaListV2(row.saleTypeCode).then(res => {
           this.NoRebateWalletList2 = []
@@ -1177,18 +1200,22 @@ export default {
           const NoRebateWalletListId = []
           this.priceList.forEach(k => {
             if (k.priceTypeName === row.priceType) {
-              rebateListId.push(k.walletId2)
-              NoRebateWalletListId.push(k.walletId)
-              k.walletId && this.NoRebateWalletList2.push(
-                {
-                  id: k.walletId,
-                  name: k.walletName
-                }
-              )
-              k.walletId2 && this.rebateList2.push({
-                walletRebateId: k.walletId2,
-                name: k.walletName2
-              })
+              if (k.walletId) {
+                this.NoRebateWalletList2.push(
+                  {
+                    id: k.walletId,
+                    name: k.walletName
+                  }
+                )
+                NoRebateWalletListId.push(k.walletId)
+              }
+              if (k.walletId2) {
+                rebateListId.push(k.walletId2)
+                this.rebateList2.push({
+                  walletRebateId: k.walletId2,
+                  name: k.walletName2
+                })
+              }
             }
           })
           if (row.walletIds && row.walletIds.length) {
@@ -1217,6 +1244,10 @@ export default {
               }
             })
           }
+          this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
+          this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
+          this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
+          this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
         })
       }
     }

+ 77 - 45
src/views/sales_policy/components/editPolicy.vue

@@ -301,14 +301,14 @@
                 <template slot-scope="scope">
                   <template v-if="scope.row.fang">
                     <template v-for="(item, index) in scope.row.walletRelaList">
-                      <el-tag v-if="item.type === 'REBATE'" :key="index" size="mini">
+                      <el-tag v-if="item.type === 'REBATE'" :key="index" style="margin: 5px" type="success" size="mini">
                         {{ item.walletName }}
                       </el-tag>
                     </template>
                   </template>
                   <template v-else>
                     <el-select
-                      v-if="!priceList2.length"
+                      v-if="!rebateList2.length"
                       v-model="scope.row.rebateWalletIds"
                       size="mini"
                       multiple
@@ -346,14 +346,14 @@
                 <template slot-scope="scope">
                   <template v-if="scope.row.fang">
                     <template v-for="(item, index) in scope.row.walletRelaList">
-                      <el-tag v-if="item.type === 'COMMONLY'" :key="index" size="mini">
+                      <el-tag v-if="item.type === 'COMMONLY'" :key="index" style="margin: 5px" type="success" size="mini">
                         {{ item.walletName }}
                       </el-tag>
                     </template>
                   </template>
                   <template v-else>
                     <el-select
-                      v-if="!priceList2.length"
+                      v-if="!NoRebateWalletList2.length"
                       v-model="scope.row.walletIds"
                       size="mini"
                       multiple
@@ -404,7 +404,7 @@
                   <el-button
                     type="text"
                     class="textColor el-popover-left"
-                    @click="handleEdit(scope.row)"
+                    @click="handleEdit(scope.row, scope.$index)"
                   >编辑
                   </el-button>
                   <el-popconfirm
@@ -693,47 +693,58 @@ export default {
         this.$successMsg(status ? '启用' : '作废')
       })
     },
-    handleEdit(row) {
+    handleEdit(row, index) {
       row.fang = !row.fang
-      !row.fang && this.handleWallet(row)
+      !row.fang && this.handleWallet(row, index)
     },
     setText(e, index, row, name) {
       if (e) {
         if (name === 'priceType') {
-          const item = this.priceList.find(k => k.priceTypeId === e)
           this.NoRebateWalletList2 = []
           this.rebateList2 = []
           const rebateListId = []
           const NoRebateWalletListId = []
           this.priceList.forEach(k => {
             if (k.priceTypeId === e) {
-              this.NoRebateWalletList2.push(
-                {
-                  id: k.walletId,
-                  name: k.walletName
-                }
-              )
-              this.rebateList2.push({
-                walletRebateId: k.walletId2,
-                name: k.walletName2
-              })
-              NoRebateWalletListId.push(k.walletId)
-              rebateListId.push(k.walletId2)
+              if (k.walletId) {
+                this.NoRebateWalletList2.push(
+                  {
+                    id: k.walletId,
+                    name: k.walletName
+                  }
+                )
+                NoRebateWalletListId.push(k.walletId)
+              }
+              if (k.walletId2) {
+                this.rebateList2.push({
+                  walletRebateId: k.walletId2,
+                  name: k.walletName2
+                })
+                rebateListId.push(k.walletId2)
+              }
             }
           })
-          if (NoRebateWalletListId.length && !~NoRebateWalletListId.indexOf(this.importWallet.walletId)) {
-            this.importWallet.walletId && this.NoRebateWalletList2.push(this.importWallet)
+          if (NoRebateWalletListId.length && this.importWallet.id && !~NoRebateWalletListId.indexOf(this.importWallet.id)) {
+            this.NoRebateWalletList2.push(this.importWallet)
+            NoRebateWalletListId.push(this.importWallet.id)
           }
-          if (rebateListId.length && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
-            this.importRebate.walletRebateId && this.rebateList2.push(this.importRebate)
+          if (rebateListId.length && this.importRebate.walletRebateId && !~rebateListId.indexOf(this.importRebate.walletRebateId)) {
+            this.rebateList2.push(this.importRebate)
+            rebateListId.push(this.importRebate.walletRebateId)
           }
+          const item = this.priceList.find(k => k.priceTypeId === e)
           this.dataList[index][name] = item.priceTypeName
           this.$set(row, 'walletIds', [])
+          this.$set(row, 'rebateWalletIds', [])
+          this.dataList[index].walletIds = []
+          this.dataList[index].rebateWalletIds = []
           if (item.walletId) {
-            this.$set(row, 'walletIds', [...row.walletIds, item.walletId])
+            this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
+            this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
           }
           if (item.walletId2) {
-            this.$set(row, 'rebateWalletIds', [...row.rebateWalletIds, item.walletId2])
+            this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
+            this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
           }
           return
         }
@@ -744,6 +755,8 @@ export default {
         this.dataList[index][name] = ''
         this.$set(row, 'walletIds', [])
         this.$set(row, 'rebateWalletIds', [])
+        this.dataList[index].walletIds = []
+        this.dataList[index].rebateWalletIds = []
       }
     },
     // 下载excel模板
@@ -886,7 +899,12 @@ export default {
       this.$set(row, 'saleTypeName', item.saleName)
       this.$set(row, 'priceType', '')
       this.priceList = []
-
+      this.rebateList2 = []
+      this.NoRebateWalletList2 = []
+      this.$set(row, 'walletIds', [])
+      this.$set(row, 'rebateWalletIds', [])
+      this.dataList[index].walletIds = []
+      this.dataList[index].rebateWalletIds = []
       // this.$set(row,'saleTypeId',item.id)
     },
     // 修改条件名称
@@ -1035,8 +1053,10 @@ export default {
               d.name = d.walletName
               if (d.type === 'REBATE') {
                 k.rebateWalletIds = [...k.rebateWalletIds, d.walletId]
+                k.ovalRebateWalletIds = [...k.rebateWalletIds, d.walletId]
               } else {
                 k.walletIds = [...k.walletIds, d.walletId]
+                k.ovalWalletIds = [...k.rebateWalletIds, d.walletId]
               }
             }
             // this.priceList.forEach(l => {
@@ -1262,35 +1282,40 @@ export default {
       }
       return result
     },
-    handleWallet(row) {
+    handleWallet(row, index) {
       if (row.saleTypeCode) {
         this.getPriceSalesRelaListV2(row.saleTypeCode).then(res => {
           this.NoRebateWalletList2 = []
           this.rebateList2 = []
           const rebateListId = []
           const NoRebateWalletListId = []
-          this.priceList.length && this.priceList.forEach(k => {
+          this.priceList.forEach(k => {
             if (k.priceTypeName === row.priceType) {
-              rebateListId.push(k.walletId2)
-              NoRebateWalletListId.push(k.walletId)
-              k.walletId && this.NoRebateWalletList2.push(
-                {
-                  id: k.walletId,
-                  name: k.walletName
-                }
-              )
-              k.walletId2 && this.rebateList2.push({
-                walletRebateId: k.walletId2,
-                name: k.walletName2
-              })
+              if (k.walletId) {
+                this.NoRebateWalletList2.push(
+                  {
+                    id: k.walletId,
+                    name: k.walletName
+                  }
+                )
+                NoRebateWalletListId.push(k.walletId)
+              }
+              if (k.walletId2) {
+                rebateListId.push(k.walletId2)
+                this.rebateList2.push({
+                  walletRebateId: k.walletId2,
+                  name: k.walletName2
+                })
+              }
             }
           })
-          if (row.walletIds && row.walletIds.length) {
-            row.walletIds.forEach(k => {
+          if (row.ovalWalletIds && row.ovalWalletIds.length) {
+            row.ovalWalletIds.forEach(k => {
               if (!~NoRebateWalletListId.indexOf(k)) {
                 const item = this.NoRebateWalletList.find(e => e.id === k)
                 this.importWallet = item
                 this.NoRebateWalletList2.push(item)
+                NoRebateWalletListId.push(item.id)
               }
               if (~NoRebateWalletListId.indexOf(k)) {
                 const item = this.NoRebateWalletList.find(e => e.id === k)
@@ -1298,12 +1323,14 @@ export default {
               }
             })
           }
-          if (row.rebateWalletIds && row.rebateWalletIds.length) {
-            row.rebateWalletIds.forEach(k => {
+          console.log(row.ovalRebateWalletIds, this.rebateList)
+          if (row.ovalRebateWalletIds && row.ovalRebateWalletIds.length) {
+            row.ovalRebateWalletIds.forEach(k => {
               if (!~rebateListId.indexOf(k)) {
                 const item = this.rebateList.find(e => e.walletRebateId === k)
                 this.importRebate = item
                 this.rebateList2.push(item)
+                rebateListId.push(item.walletRebateId)
               }
               if (~rebateListId.indexOf(k)) {
                 const item = this.rebateList.find(e => e.walletRebateId === k)
@@ -1311,6 +1338,11 @@ export default {
               }
             })
           }
+
+          this.$set(row, 'walletIds', [...new Set([...row.walletIds, ...NoRebateWalletListId])])
+          this.$set(row, 'rebateWalletIds', [...new Set([...row.rebateWalletIds, ...rebateListId])])
+          this.dataList[index].walletIds = [...new Set([...row.walletIds, ...NoRebateWalletListId])]
+          this.dataList[index].rebateWalletIds = [...new Set([...row.rebateWalletIds, ...rebateListId])]
         })
       }
     }