Jelajahi Sumber

Merge tag 'Hotfix-zh-294' into develop

Finish Hotfix-zh-294
howie 2 tahun lalu
induk
melakukan
3bc9fd6b20

+ 58 - 50
src/api/common.js

@@ -1,109 +1,117 @@
-import request from "@/utils/request";
+import request from '@/utils/request'
 
 // 字典列表
 export function getDictList(params) {
   return request({
-    url: "/common/dict/list",
-    method: "get",
-    params,
-  });
+    url: '/common/dict/list',
+    method: 'get',
+    params
+  })
 }
 
 // 修改字典列表
 export function editDictList(params) {
   return request({
-    url: "/common/dict/update",
-    method: "post",
-    data: params,
-  });
+    url: '/common/dict/update',
+    method: 'post',
+    data: params
+  })
 }
 // 删除字典
 export function deleDictList(params) {
   return request({
-    url: "/common/dict/del",
-    method: "post",
-    params,
-  });
+    url: '/common/dict/del',
+    method: 'post',
+    params
+  })
 }
 // 添加字典
 export function addDictList(params) {
   return request({
-    url: "/common/dict/add",
-    method: "post",
-    data: params,
-  });
+    url: '/common/dict/add',
+    method: 'post',
+    data: params
+  })
 }
 
 // 销售类型列表
 export function getTypeList(params) {
   return request({
-    url: "/sale/type/list",
-    method: "get",
-    params,
-  });
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+// 销售类型-家用工程专用
+export function getHomeTypeList(params) {
+  return request({
+    url: '/sale/type/home/list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取oss配置
 export function getOssConfig(params) {
   return request({
-    url: "/common/oss/config",
-    method: "get",
-    params,
-  });
+    url: '/common/oss/config',
+    method: 'get',
+    params
+  })
 }
 
 // 获取附件地址
 export function getFileUrl(params) {
   return request({
-    url: "/common/file/get",
-    method: "get",
-    params,
-  });
+    url: '/common/file/get',
+    method: 'get',
+    params
+  })
 }
 
 // 获取产品小类列表
 export function getSmallList(params) {
   return request({
-    url: "/product-category/sub-list",
-    method: "get",
-    params,
-  });
+    url: '/product-category/sub-list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取经销商列表
 export function getDealerList(params) {
   return request({
-    url: "/customer/list",
-    method: "get",
-    params,
-  });
+    url: '/customer/list',
+    method: 'get',
+    params
+  })
 }
 
 // 获取存货类别列表
 export function getCategoryList(params) {
   return request({
-    url: "/k3/category/list",
-    method: "get",
-    params,
-  });
+    url: '/k3/category/list',
+    method: 'get',
+    params
+  })
 }
 
 // 联查单据
 export function checkOrder(params) {
   return request({
-    url: "/invoice/listInvoiceRetreat",
-    method: "get",
-    params,
-  });
+    url: '/invoice/listInvoiceRetreat',
+    method: 'get',
+    params
+  })
 }
 
 // 获取业务员列表
 export function getSalesmanList(params) {
   return request({
-    url: "/admin/user/list",
-    method: "get",
-    params,
-  });
+    url: '/admin/user/list',
+    method: 'get',
+    params
+  })
 }
 
 // 更新发票
@@ -111,6 +119,6 @@ export function updateReceipt(params) {
   return request({
     url: '/stock/manager/receipt',
     method: 'get',
-     params
+    params
   })
 }

+ 5 - 1
src/views/dashboard/index.vue

@@ -54,7 +54,7 @@
               <el-link
                 class="link"
                 :underline="false"
-                @click="clickMenu(item.curUrl + '/index')"
+                @click="clickMenu(item.curUrl)"
               >{{ item.moduleName }}</el-link>
             </div>
           </div>
@@ -602,6 +602,10 @@ export default {
 
     // 点击菜单
     clickMenu(path) {
+      const curlArr = ['/notice', '/issue']
+      if (curlArr.includes(path)) {
+        path += '/index'
+      }
       this.$router.push({
         path
       })

+ 208 - 191
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -54,7 +54,7 @@
           <el-col :xs="24" :sm="24" :lg="16" class="item">
             <div class="label">跨区厂编号</div>
             <div class="value">
-<!--              {{ details.refFactoryNo }}-->
+              <!--              {{ details.refFactoryNo }}-->
               <el-form-item prop="refFactoryNo">
                 <el-input
                   v-model="details.refFactoryNo"
@@ -77,12 +77,12 @@
             <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">
-              <div class="label">格力备注</div>
-              <div class="value">
-                 <el-input  v-model=" details.geLiInerNote" placeholder="格力备注" ></el-input>
-              </div>
-            </el-col>
+          <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="格力备注" />
+            </div>
+          </el-col>
           <el-col :xs="24" :sm="24" :lg="24" class="item">
             <div class="label">使用单位</div>
             <div class="value">{{ details.refUseUnit }}</div>
@@ -165,26 +165,26 @@
             show-overflow-tooltip
           />
           <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
-                    {{scope.row.realSpecification}}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
-          <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialNumber}}
-                </div>
-              </template>
-        </el-table-column>
-            <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialOldNumber}}
-                </div>
-              </template>
-            </el-table-column>
+            <template slot-scope="scope">
+              <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
+                {{ scope.row.realSpecification }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
+                {{ scope.row.realMaterialNumber }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
+                {{ scope.row.realMaterialOldNumber }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="单价"
@@ -200,16 +200,16 @@
             show-overflow-tooltip
           />
           <el-table-column
-              align="right"
-              label="金额"
-              prop="totalAmount"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.totalAmount | numToFixed }}
-              </template>
-            </el-table-column>
+            align="right"
+            label="金额"
+            prop="totalAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.totalAmount | numToFixed }}
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="押金数量"
@@ -225,66 +225,66 @@
             show-overflow-tooltip
           />
           <el-table-column
-              align="right"
-              label="合同数量"
-              prop="contractQty"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
+            align="right"
+            label="合同数量"
+            prop="contractQty"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
 
-                <el-input
+              <el-input
 
-                  class="inpt"
-                  v-model.number="scope.row.contractQty"
-                  size="mini"
-                  clearable
-                ></el-input>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="合同单价"
-              prop="contractPrice"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
+                v-model.number="scope.row.contractQty"
+                class="inpt"
+                size="mini"
+                clearable
+              />
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="合同单价"
+            prop="contractPrice"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
 
-                <el-input
+              <el-input
 
-                  class="inpt"
-                  v-model.number="scope.row.contractPrice"
-                  size="mini"
-                  clearable
-                ></el-input>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="合同金额"
-              prop="contractAmount"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
+                v-model.number="scope.row.contractPrice"
+                class="inpt"
+                size="mini"
+                clearable
+              />
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="合同金额"
+            prop="contractAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
 
-                <div >
-                  {{comTotal(scope.row.contractQty,scope.row.contractPrice)}}
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="押金金额"
-              prop="depositAmount"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.depositAmount | numToFixed }}
-              </template>
-            </el-table-column>
+              <div>
+                {{ comTotal(scope.row.contractQty,scope.row.contractPrice) }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="押金金额"
+            prop="depositAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.depositAmount | numToFixed }}
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="上交资料"
@@ -293,37 +293,37 @@
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-                <el-input
+              <el-input
+                v-model.number.trim="scope.row.dataQty"
+                class="inpt"
+                size="mini"
+
                 @blur="setDataQty($event,scope.row)"
-                  class="inpt"
-                  v-model.number="scope.row.dataQty"
-                  size="mini"
-                  clearable
-                ></el-input>
-              </template>
-        </el-table-column>
-        <el-table-column
-              align="right"
-              label="收差金额"
-              prop="diffAmount"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.diffAmount | numToFixed }}
-              </template>
-            </el-table-column>
+              />
+            </template>
+          </el-table-column>
           <el-table-column
-              align="right"
-              label="收差政策价格"
-              prop="diffPolicyPrice"
-              min-width="200"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.diffPolicyPrice | numToFixed }}
-              </template>
-            </el-table-column>
+            align="right"
+            label="收差金额"
+            prop="diffAmount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.diffAmount | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="收差政策价格"
+            prop="diffPolicyPrice"
+            min-width="200"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.diffPolicyPrice | numToFixed }}
+            </template>
+          </el-table-column>
         </el-table>
       </div>
     </div>
@@ -344,7 +344,7 @@
               <imageUpload :file-list="fileList" :multiple="true" :start-restricting="true" :restrict-filename="restrictFilename" />
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="24" v-if="details.dataList && details.dataList.length">
+          <el-col v-if="details.dataList && details.dataList.length" :xs="24" :sm="12" :lg="24">
             <!-- 列表 -->
             <div class="mymain-container">
               <div class="table">
@@ -446,7 +446,7 @@
                         title="这是一段内容确定删除吗?"
                         @onConfirm="delFile(scope.$index)"
                       >
-                        <el-button type="text" slot="reference">删除</el-button>
+                        <el-button slot="reference" type="text">删除</el-button>
                       </el-popconfirm>
 
                     </template>
@@ -488,12 +488,15 @@
               />
             </el-form-item>
           </el-col>
-            <el-col :xs="24" :sm="12" :lg="18"  v-if="details.checkBy && details.checkDate">
-            <el-form-item label="验收说明
-" prop="checkNote">
+          <el-col v-if="details.checkBy && details.checkDate" :xs="24" :sm="12" :lg="18">
+            <el-form-item
+              label="验收说明
+"
+              prop="checkNote"
+            >
               <el-input
                 v-model="details.checkNote"
-                 disabled
+                disabled
                 type="textarea"
                 placeholder="请输入验收说明
 "
@@ -522,7 +525,7 @@
 </template>
 
 <script>
-import { applyDeposit, geDetail,computeDiff } from '@/api/engin_deposit.js'
+import { applyDeposit, geDetail, computeDiff } from '@/api/engin_deposit.js'
 
 import imageUpload from '@/components/Common/image-upload.vue'
 import { downloadFiles, downloadPdf } from '@/utils/util'
@@ -541,36 +544,34 @@ export default {
       fileList: [],
       details: {},
       restrictFilename: [
-        '结算单', '合同', '明细表', '审核表', '收据', '发票', '照片','相片'
-      ],
+        '结算单', '合同', '明细表', '审核表', '收据', '发票', '照片', '相片'
+      ]
 
     }
   },
-    computed:{
-    isCustomer(){
+  computed: {
+    isCustomer() {
       return this.$store.getters.customerId && this.$store.getters.customerNumber
     },
-    comTotal(){
-      return (qty,price)=>{
-
+    comTotal() {
+      return (qty, price) => {
         return Number(qty) * Number(price)
       }
     }
   },
-  watch:{
-    "details.items": {
+  watch: {
+    'details.items': {
       handler(newValue, oldValue) {
-          if (newValue && newValue.length) {
-            newValue.forEach((item, index) => {
+        if (newValue && newValue.length) {
+          newValue.forEach((item, index) => {
             item.contractAmount = Number(item.contractQty) * Number(item.contractPrice)
-          });
-
-          }
-        this.details.items = newValue;
+          })
+        }
+        this.details.items = newValue
       },
       immediate: true,
-      deep: true,
-    },
+      deep: true
+    }
   },
   created() {
     this.imageURL = this.$imageUrl
@@ -578,40 +579,38 @@ export default {
   },
   methods: {
 
-    geDetail(){
+    geDetail() {
       geDetail({ id: this.$parent.depositManageId }).then((res) => {
-      let arr = []
-      res.data.items.forEach((item) => {
-        if (Number(item.qty)>0) {
-              arr.push(item)
-            }
-        // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
-        item.sums1 = ['orderHasSendQty', 'dataQty', 'qty',"hasSendQty","contractQty"]
-        item.sums2 = ['totalAmount', 'diffAmount', 'price','depositAmount',   "contractPrice","comTotal",
-          "contractAmount",]
+        const arr = []
+        res.data.items.forEach((item) => {
+          if (Number(item.qty) > 0) {
+            arr.push(item)
+          }
+          // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+          item.sums1 = ['orderHasSendQty', 'dataQty', 'qty', 'hasSendQty', 'contractQty']
+          item.sums2 = ['totalAmount', 'diffAmount', 'price', 'depositAmount', 'contractPrice', 'comTotal',
+            'contractAmount']
+        })
+        res.data.items = arr
+        this.details = res.data
       })
-      res.data.items = arr
-      this.details = res.data
-
-    })
     },
 
     // 计算收差金额
-    setDataQty(e,row){
-        if(!row.dataQty) return
+    setDataQty(e, row) {
+      if (!row.dataQty) return row.dataQty = 0
       row.saleTypeId = this.details.saleTypeId
-      computeDiff(row).then(res=>{
+      computeDiff(row).then(res => {
         row.diffAmount = res.data.diffAmount
         row.diffPolicyPrice = res.data.diffPolicyPrice
       // this.$successMsg('已计算收差金额')
       })
-    }
-    ,
+    },
     goBack() {
       this.$parent.showPage = 1
     },
     handleSvse() {
-          const arr = []
+      const arr = []
       if (!this.details.installDate) {
         this.$errorMsg('请选择安装时间')
         return
@@ -619,23 +618,19 @@ export default {
 
       if (this.isCustomer) {
         for (let i = 0; i < this.details.items.length; i++) {
-            this.details.items[i].contractAmount = this.details.items[i].contractQty * this.details.items[i].contractPrice
-              if (!this.details.items[i].contractAmount) {
-                return this.$errorMsg('合同单价、合同数量不能为空')
-              }
-
+          this.details.items[i].contractAmount = this.details.items[i].contractQty * this.details.items[i].contractPrice
+          if (!this.details.items[i].contractAmount) {
+            return this.$errorMsg('合同单价、合同数量不能为空')
           }
+        }
       }
 
-
-
       this.fileList.forEach((el) => {
-
-        if (this.details.dataList.length){
-          this.details.dataList.forEach((i,e)=>{
-            console.log(i.fileName==el.name)
-            if (el.name === i.fileName){
-              this.details.dataList.splice(e,1)
+        if (this.details.dataList.length) {
+          this.details.dataList.forEach((i, e) => {
+            console.log(i.fileName == el.name)
+            if (el.name === i.fileName) {
+              this.details.dataList.splice(e, 1)
             }
           })
         }
@@ -647,18 +642,40 @@ export default {
           fileUrl: el.url
         })
       })
-      applyDeposit({
-        ...this.details,
-        dataList:[...arr,...this.details.dataList]
-      }).then((res) => {
-        this.$successMsg('申请成功')
-        this.$parent.showPage = 1
-        this.$parent.deduction = ''
-        this.$parent.getList()
-      })
+
+      if (!this.details.items.every(e => e.dataQty)) {
+        this.$confirm(`上交资料为0,是否继续提交`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          applyDeposit({
+            ...this.details,
+            dataList: [...arr, ...this.details.dataList]
+          }).then((res) => {
+            this.$successMsg('申请成功')
+            this.$parent.showPage = 1
+            this.$parent.deduction = ''
+            this.$parent.getList()
+          })
+          return
+        }).catch(() => {
+
+        })
+      } else {
+        applyDeposit({
+          ...this.details,
+          dataList: [...arr, ...this.details.dataList]
+        }).then((res) => {
+          this.$successMsg('申请成功')
+          this.$parent.showPage = 1
+          this.$parent.deduction = ''
+          this.$parent.getList()
+        })
+      }
     },
-    delFile(index){
-      this.details.dataList.splice(index,1)
+    delFile(index) {
+      this.details.dataList.splice(index, 1)
       this.$successMsg('删除成功')
     },
     handleReset() {
@@ -674,7 +691,7 @@ export default {
         downloadPdf(this.$imageUrl + v, fileName)
         return
       }
-        downloadFiles("common/file/getStream", { key: v, fileName:fileName});
+      downloadFiles('common/file/getStream', { key: v, fileName: fileName })
       // getFileUrl({ key: v }).then((res) => {
       //   window.open(res.data)
       // })
@@ -704,7 +721,7 @@ export default {
       } else {
         return ''
       }
-    },
+    }
   }
 }
 </script>

File diff ditekan karena terlalu besar
+ 249 - 229
src/views/deposit_home/components/refund_list-detail.vue


+ 14 - 15
src/views/sales_policy/components/AddPolicy.vue

@@ -368,21 +368,20 @@
             </el-table-column>
             <el-table-column fixed="right" label="操作" align="center">
               <template slot-scope="scope">
-                <!--                <el-popconfirm-->
-                <!--                  confirm-button-text="好的"-->
-                <!--                  cancel-button-text="不用了"-->
-                <!--                  icon="el-icon-info"-->
-                <!--                  icon-color="red"-->
-                <!--                  title="内容确定删除吗?"-->
-                <!--                  @onConfirm="handleDelete(scope.row.id, scope.$index)"-->
-                <!--                >-->
-                <!--                  <el-button-->
-                <!--                    slot="reference"-->
-                <!--                    type="text"-->
-                <!--                    class="textColor el-popover-left"-->
-                <!--                    >删除</el-button-->
-                <!--                  >-->
-                <!--                </el-popconfirm>-->
+                <el-popconfirm
+                  confirm-button-text="好的"
+                  cancel-button-text="不用了"
+                  icon="el-icon-info"
+                  icon-color="red"
+                  title="内容确定删除吗?"
+                  @onConfirm="handleDelete(scope.row.id, scope.$index)"
+                >
+                  <el-button
+                    slot="reference"
+                    type="text"
+                    class="textColor el-popover-left"
+                  >删除</el-button>
+                </el-popconfirm>
                 <el-popconfirm
                   v-if="!scope.row.status"
                   confirm-button-text="好的"

+ 14 - 14
src/views/sales_policy/components/editPolicy.vue

@@ -376,20 +376,20 @@
                 align="center"
               >
                 <template slot-scope="scope">
-                  <!--                <el-popconfirm-->
-                  <!--                  confirm-button-text="好的"-->
-                  <!--                  cancel-button-text="不用了"-->
-                  <!--                  icon="el-icon-info"-->
-                  <!--                  icon-color="red"-->
-                  <!--                  title="内容确定删除吗?"-->
-                  <!--                  @onConfirm="handleDelete(scope.row.id, scope.$index)"-->
-                  <!--                >-->
-                  <!--                  <el-button-->
-                  <!--                    slot="reference"-->
-                  <!--                    type="text"-->
-                  <!--                    class="textColor el-popover-left"-->
-                  <!--                  >删除</el-button>-->
-                  <!--                </el-popconfirm>-->
+                  <el-popconfirm
+                    confirm-button-text="好的"
+                    cancel-button-text="不用了"
+                    icon="el-icon-info"
+                    icon-color="red"
+                    title="内容确定删除吗?"
+                    @onConfirm="handleDelete(scope.row.id, scope.$index)"
+                  >
+                    <el-button
+                      slot="reference"
+                      type="text"
+                      class="textColor el-popover-left"
+                    >删除</el-button>
+                  </el-popconfirm>
                   <el-popconfirm
                     v-if="!scope.row.status"
                     confirm-button-text="好的"

+ 175 - 169
src/views/supply/engin/components/home_examine.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="detail-container">
-    <el-page-header @back="goBack" content="审批"></el-page-header>
+    <el-page-header content="审批" @back="goBack" />
 
     <div class="main-title">
       <div class="title">工程订单</div>
@@ -10,108 +10,113 @@
       <el-row>
         <el-col :span="8" class="item">
           <div class="label">工程订单号</div>
-          <div class="value">{{detailData.enginOrderNo}}</div>
+          <div class="value">{{ detailData.enginOrderNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">订单日期</div>
-          <div class="value">{{detailData.orderDate}}</div>
+          <div class="value">{{ detailData.orderDate }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>
-          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+          <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">经销商编码</div>
-          <div class="value">{{detailData.customerNumber}}</div>
+          <div class="value">{{ detailData.customerNumber }}</div>
         </el-col>
         <el-col :span="16" class="item">
           <div class="label">经销商名称</div>
-          <div class="value">{{detailData.customerName}}</div>
+          <div class="value">{{ detailData.customerName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">工程登录编号</div>
-          <div class="value">{{detailData.refEnginRecordNo}}</div>
+          <div class="value">{{ detailData.refEnginRecordNo }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">项目类别</div>
           <div class="value">
-            <el-input v-model="detailData.refProjectCategory" placeholder="请输入项目类别"></el-input>
+            <el-input v-model="detailData.refProjectCategory" placeholder="请输入项目类别" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">行业类别</div>
           <div class="value">
-            <el-input v-model="detailData.refTradeCategory" placeholder="请输入行业类别"></el-input>
+            <el-input v-model="detailData.refTradeCategory" :disabled="isCustomer" placeholder="请输入行业类别" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">跨区厂编号</div>
           <div class="value">
-            <el-input v-model="detailData.refFactoryNo" placeholder="请输入跨区厂编号"></el-input>
+            <el-input v-model="detailData.refFactoryNo" placeholder="请输入跨区厂编号" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">使用单位</div>
           <div class="value">
-            <el-input v-model="detailData.refUseUnit" placeholder="请输入使用单位"></el-input>
+            <el-input v-model="detailData.refUseUnit" placeholder="请输入使用单位" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">购买单位</div>
           <div class="value">
-            <el-input v-model="detailData.refBuyUnitName" placeholder="请输入购买单位"></el-input>
+            <el-input v-model="detailData.refBuyUnitName" placeholder="请输入购买单位" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">区域</div>
-          <div class="value">{{detailData.refRegionWork}}</div>
+          <div class="value">{{ detailData.refRegionWork }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">销售类型</div>
           <div class="value">
-                <el-select v-model="detailData.saleTypeId" placeholder="选择销售类型" size="small" style="width: 100%"
-                  :disabled="detailData.examineStatus =='OK' && isDealer"
-                clearable>
-              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            <el-select
+              v-model="detailData.saleTypeId"
+              placeholder="选择销售类型"
+              size="small"
+              style="width: 100%"
+              :disabled="detailData.examineStatus =='OK' && isDealer"
+              clearable
+            >
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" />
             </el-select>
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">第几次申报</div>
           <div class="value">
-            <el-input v-model="detailData.refDeclareNo" placeholder="请输入第几次申报"></el-input>
+            <el-input v-model="detailData.refDeclareNo" placeholder="请输入第几次申报" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">联系人</div>
           <div class="value">
-            <el-input v-model="detailData.refLinkman" placeholder="请输入联系人"></el-input>
+            <el-input v-model="detailData.refLinkman" placeholder="请输入联系人" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">固定电话</div>
           <div class="value">
-            <el-input v-model="detailData.refTel" placeholder="请输入固定电话"></el-input>
+            <el-input v-model="detailData.refTel" placeholder="请输入固定电话" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">移动电话</div>
           <div class="value">
-            <el-input v-model="detailData.refPhone" placeholder="请输入移动电话"></el-input>
+            <el-input v-model="detailData.refPhone" placeholder="请输入移动电话" />
           </div>
         </el-col>
         <el-col :span="16" class="item">
           <div class="label">安装地址</div>
           <div class="value">
-            <el-input v-model="detailData.refInstallAddress" placeholder="请输入安装地址"></el-input>
+            <el-input v-model="detailData.refInstallAddress" placeholder="请输入安装地址" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">保证函</div>
           <div class="value">
             <el-select v-model="detailData.refPromiseProvide" placeholder="选择保证函状态" size="small" clearable style="width: 100%">
-              <el-option label="未保证" value="未保证"></el-option>
-              <el-option label="已保证" value="已保证"></el-option>
+              <el-option label="未保证" value="未保证" />
+              <el-option label="已保证" value="已保证" />
             </el-select>
           </div>
         </el-col>
@@ -119,13 +124,13 @@
           <div class="label">不扣押金</div>
           <div class="value">
             <!-- {{detailData.takeDeposit ? '是':'否'}} -->
-            <el-checkbox v-model="detailData.takeDeposit">{{detailData.takeDeposit ? '是':'否'}}</el-checkbox>
+            <el-checkbox v-model="detailData.takeDeposit">{{ detailData.takeDeposit ? '是':'否' }}</el-checkbox>
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">文件编号</div>
           <div class="value">
-            <el-input v-model="detailData.fileNo" placeholder="请输入文件编号"></el-input>
+            <el-input v-model="detailData.fileNo" placeholder="请输入文件编号" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
@@ -136,8 +141,8 @@
                 v-for="item in salesmanList"
                 :key="item.adminUserId"
                 :label="item.nickName"
-                :value="item.adminUserId">
-              </el-option>
+                :value="item.adminUserId"
+              />
             </el-select>
           </div>
         </el-col>
@@ -156,50 +161,50 @@
         <el-col :span="16" class="item">
           <div class="label">项目说明</div>
           <div class="value">
-            <el-input v-model="detailData.refProjectNote" placeholder="请输入项目说明"></el-input>
+            <el-input v-model="detailData.refProjectNote" placeholder="请输入项目说明" />
           </div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">项目类型</div>
           <div class="value">
-            <el-input v-model="detailData.refProjectType" placeholder="请输入项目类型"></el-input>
+            <el-input v-model="detailData.refProjectType" placeholder="请输入项目类型" />
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">其他附件审批意见</div>
-          <div class="value">{{detailData.refOtherAnnexIdea}}</div>
+          <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
           <div class="value">
-            <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注"></el-input>
+            <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
           </div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">备注</div>
           <div class="value">
-            <el-input v-model="detailData.remark" placeholder="请输入备注"></el-input>
+            <el-input v-model="detailData.remark" placeholder="请输入备注" />
           </div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">制单人</div>
-          <div class="value">{{detailData.createName}}</div>
+          <div class="value">{{ detailData.createName }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">制单日期</div>
-          <div class="value">{{detailData.createTime}}</div>
+          <div class="value">{{ detailData.createTime }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">关闭人</div>
-          <div class="value">{{detailData.closeName}}</div>
+          <div class="value">{{ detailData.closeName }}</div>
         </el-col>
         <el-col :span="6" class="item">
           <div class="label">关闭日期</div>
-          <div class="value">{{detailData.closeTime}}</div>
+          <div class="value">{{ detailData.closeTime }}</div>
         </el-col>
-        <el-col :span="24" class="item" v-if="!isDealer">
+        <el-col v-if="!isDealer" :span="24" class="item">
           <div class="label">引用记录</div>
-          <div class="value">{{goodsList[0] && goodsList[0].useRefCount}}</div>
+          <div class="value">{{ goodsList[0] && goodsList[0].useRefCount }}</div>
         </el-col>
 
       </el-row>
@@ -219,32 +224,33 @@
         stripe
         max-height="400"
         show-summary
-        :summary-method="$getSummaries">
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        :summary-method="$getSummaries"
+      >
+        <el-table-column align="center" label="序号" type="index" width="50" />
         <!-- <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="160" show-overflow-tooltip></el-table-column> -->
-        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+        <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
 
-            <el-table-column align="left"  label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
-                    {{scope.row.realSpecification}}
-                </div>
-              </template>
-            </el-table-column>
+        <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div :style="scope.row.realSpecification != scope.row.specification?{color:'blue'}:''">
+              {{ scope.row.realSpecification }}
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <!-- {{ (scope.row.qty*100 - scope.row.directTransferQty*100 - scope.row.retiredQty*100) / 100 }} -->
-            <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent></el-input>
+            <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <!-- {{ scope.row.price | numToFixed }} -->
-            <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent></el-input>
+            <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
@@ -252,7 +258,7 @@
             {{ scope.row.totalAmount | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip />
         <!-- <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="140" show-overflow-tooltip></el-table-column>
         <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -266,8 +272,8 @@
                 v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
                 :label="item.customerWalletName"
-                :value="item.customerWalletId">
-              </el-option>
+                :value="item.customerWalletId"
+              />
             </el-select>
           </template>
         </el-table-column>
@@ -284,14 +290,14 @@
                 v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
                 :label="item.customerWalletName"
-                :value="item.customerWalletId">
-              </el-option>
+                :value="item.customerWalletId"
+              />
             </el-select>
           </template>
         </el-table-column>
         <el-table-column align="right" label="返利金额" prop="compute_flAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) | numToFixed}}
+            {{ ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) | numToFixed }}
           </template>
         </el-table-column>
         <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
@@ -301,7 +307,7 @@
         </el-table-column>
         <el-table-column align="right" label="实付金额" prop="compute_sfAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            {{(((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100)  | numToFixed}}
+            {{ (((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100) | numToFixed }}
           </template>
         </el-table-column>
         <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
@@ -309,25 +315,25 @@
             {{ scope.row.isDirectTransfer ? '是' : '否' }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
         <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip>
           <template slot-scope="scope">
-                <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialNumber}}
-                </div>
-              </template>
+            <div :style="scope.row.realMaterialNumber != scope.row.materialNumber?{color:'blue'}:''">
+              {{ scope.row.realMaterialNumber }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
+              {{ scope.row.realMaterialOldNumber }}
+            </div>
+          </template>
         </el-table-column>
-            <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber?{color:'blue'}:''">
-                    {{scope.row.realMaterialOldNumber}}
-                </div>
-              </template>
-            </el-table-column>
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -338,24 +344,24 @@
       <el-row :gutter="0">
         <el-col :span="12" class="item">
           <div class="label">审批人</div>
-          <div class="value">{{userName}}</div>
+          <div class="value">{{ userName }}</div>
         </el-col>
         <el-col :span="12" class="item">
           <div class="label">审批日期</div>
-          <div class="value">{{getDate()}}</div>
+          <div class="value">{{ getDate() }}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
-          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入审批说明"></el-input></div>
+          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入审批说明" /></div>
         </el-col>
       </el-row>
     </div>
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm(1)" :loading="formLoading">审批通过</el-button>
-        <el-button type="warning" @click="clickSubmitForm(0)" :loading="formLoading">审批驳回</el-button>
-        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;" v-if="!isCustomer">
+        <el-button type="primary" :loading="formLoading" @click="clickSubmitForm(1)">审批通过</el-button>
+        <el-button type="warning" :loading="formLoading" @click="clickSubmitForm(0)">审批驳回</el-button>
+        <el-popconfirm v-if="!isCustomer" title="确定关闭吗?" style="margin-left: 10px;" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -365,57 +371,57 @@
 </template>
 
 <script>
-import { getOrderDetail, examineHome } from "@/api/supply/engin";
+import { getOrderDetail, examineHome } from '@/api/supply/engin'
 import { getTypeList, getSalesmanList } from '@/api/common'
-import { mapGetters } from "vuex";
+import { mapGetters } from 'vuex'
 
 export default {
   name: 'HomeExamine',
   componentName: 'HomeExamine',
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
         { label: '已保存', value: 'SAVE' },
         { label: '待审核', value: 'WAIT' },
         { label: '审核通过', value: 'OK' },
-         // { label: '审核驳回', value: 'FAIL' },,
-        { label: '已关闭', value: 'CLOSE' },
-      ];
-      let obj = statusList.find(o => o.value == val);
+        // { label: '审核驳回', value: 'FAIL' },,
+        { label: '已关闭', value: 'CLOSE' }
+      ]
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
-      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+      userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
       detailData: {},
       goodsList: [],
 
       examineForm: {
-        remark: '',
+        remark: ''
       },
 
       salesTypeList: [],
       salesmanList: [],
 
-      formLoading: false,
+      formLoading: false
     }
   },
 
-  computed:{
+  computed: {
     ...mapGetters(['isCustomer']),
     isDealer() {
-      return JSON.parse(localStorage.getItem("supply_user")).isCustomer
-    },
+      return JSON.parse(localStorage.getItem('supply_user')).isCustomer
+    }
   },
 
   watch: {
     goodsList: {
       handler(newValue, oldValue) {
-        if(newValue && newValue.length) {
+        if (newValue && newValue.length) {
           newValue.forEach((item, index) => {
-            this.goodsList[index].compute_sfAmount = (((item.price * item.qty) * 100 - ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 - ((item.qty * (item.discAmount * 100)) / 100) * 100) / 100);
+            this.goodsList[index].compute_sfAmount = (((item.price * item.qty) * 100 - ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 - ((item.qty * (item.discAmount * 100)) / 100) * 100) / 100)
             this.goodsList[index].compute_flAmount = (item.price * item.qty * (item.rebateRate * 100)) / 100
           })
         }
@@ -426,26 +432,26 @@ export default {
   },
 
   async created() {
-    await this.getSalesmanList();
-    this.getSalesTypeList();
-    this.getDetail();
+    await this.getSalesmanList()
+    this.getSalesTypeList()
+    this.getDetail()
   },
 
   methods: {
     getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.getDate();
+      var date = new Date()
+      var seperator1 = '-'
+      var year = date.getFullYear()
+      var month = date.getMonth() + 1
+      var strDate = date.getDate()
       if (month >= 1 && month <= 9) {
-          month = "0" + month;
+        month = '0' + month
       }
       if (strDate >= 0 && strDate <= 9) {
-          strDate = "0" + strDate;
+        strDate = '0' + strDate
       }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+      var currentdate = year + seperator1 + month + seperator1 + strDate
+      return currentdate
     },
 
     // 获取销售类型列表
@@ -454,7 +460,7 @@ export default {
         pageNum: 1,
         pageSize: -1
       }).then((res) => {
-        this.salesTypeList = res.data.records;
+        this.salesTypeList = res.data.records
       })
     },
 
@@ -463,110 +469,110 @@ export default {
         pageNum: 1,
         pageSize: -1,
         isCustomer: 0,
-        status: true,
-      });
-      this.salesmanList = res.data.records;
+        status: true
+      })
+      this.salesmanList = res.data.records
     },
 
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+      this.$emit('backListFormDetail')
     },
 
     // 获取详情
     getDetail() {
-      getOrderDetail({id: this.listItem.parentId}).then(res => {
-        if(res.data.items) {
+      getOrderDetail({ id: this.listItem.parentId }).then(res => {
+        if (res.data.items) {
           res.data.items.forEach(item => {
-            item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty', 'hasSendQty'];
-            item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'payRebateAmount', 'compute_sfAmount', 'compute_flAmount'];
+            item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty', 'hasSendQty']
+            item.sums2 = ['totalAmount', 'payAmount', 'price', 'discAmount', 'payRebateAmount', 'compute_sfAmount', 'compute_flAmount']
           })
         }
         res.data.items.forEach(item => {
           item.rebateWallets = item.customerWalletList.filter(item => {
-            return item.type === 'REBATE';
-          });
+            return item.type === 'REBATE'
+          })
           item.wallets = item.customerWalletList.filter(item => {
-            return item.type === 'COMMONLY';
-          });
+            return item.type === 'COMMONLY'
+          })
         })
-        this.detailData = res.data;
-        this.goodsList = res.data.items;
-        this.examineForm.remark = res.data.examineNote;
+        this.detailData = res.data
+        this.goodsList = res.data.items
+        this.examineForm.remark = res.data.examineNote
       })
     },
 
     // 修改返利钱包
     changeFlWallet(index) {
-      if(this.goodsList[index].customerWalletId2) {
-        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
-        this.goodsList[index].rebateRate = obj.rebateRate;
-        this.goodsList[index].customerWalletName2 = obj.customerWalletName;
-      }else {
-        this.goodsList[index].rebateRate = '';
-        this.goodsList[index].customerWalletName2 = '';
+      if (this.goodsList[index].customerWalletId2) {
+        const obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2)
+        this.goodsList[index].rebateRate = obj.rebateRate
+        this.goodsList[index].customerWalletName2 = obj.customerWalletName
+      } else {
+        this.goodsList[index].rebateRate = ''
+        this.goodsList[index].customerWalletName2 = ''
       }
     },
 
     // 修改现金钱包
     changeXjWallet(index) {
-      if(this.goodsList[index].customerWalletId) {
-        let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
-        this.goodsList[index].customerWalletName = obj.customerWalletName;
-      }else {
-        this.goodsList[index].customerWalletName = '';
+      if (this.goodsList[index].customerWalletId) {
+        const obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId)
+        this.goodsList[index].customerWalletName = obj.customerWalletName
+      } else {
+        this.goodsList[index].customerWalletName = ''
       }
     },
 
     // 审批
     clickSubmitForm(val) {
-      if(!this.detailData.saleTypeId) {
-        return this.$errorMsg('请选择销售类型');
+      if (!this.detailData.saleTypeId) {
+        return this.$errorMsg('请选择销售类型')
       }
-      if(!this.detailData.serviceId) {
-        return this.$errorMsg('请选择业务员');
+      if (!this.detailData.serviceId) {
+        return this.$errorMsg('请选择业务员')
       }
       this.$confirm('此操作将审批订单, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        let saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId);
-        let saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId);
-        let params = JSON.parse(JSON.stringify(this.detailData));
-        params.examineNote = this.examineForm.remark;
-        params.examineResult = val;
-        params.refEnginRecordNo=this.detailData.refEnginRecordNo,
-        params.saleTypeId = this.detailData.saleTypeId;
-        params.saleTypeCode = saleTypeItem.saleCode;
-        params.saleTypeName = saleTypeItem.saleName;
-        params.serviceName = saleManItem.nickName;
-        this.formLoading = true;
+        const saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId)
+        const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
+        const params = JSON.parse(JSON.stringify(this.detailData))
+        params.examineNote = this.examineForm.remark
+        params.examineResult = val
+        params.refEnginRecordNo = this.detailData.refEnginRecordNo,
+        params.saleTypeId = this.detailData.saleTypeId
+        params.saleTypeCode = saleTypeItem.saleCode
+        params.saleTypeName = saleTypeItem.saleName
+        params.serviceName = saleManItem.nickName
+        this.formLoading = true
         examineHome(params).then(res => {
-          if(!res.data) {
-            this.$successMsg();
-            this.goBack();
-            this.$parent.getList();
-          }else {
+          if (!res.data) {
+            this.$successMsg()
+            this.goBack()
+            this.$parent.getList()
+          } else {
             this.$confirm('审批成功!是否跳转下一张待审批订单?', '提示', {
               confirmButtonText: '跳转',
               cancelButtonText: '取消',
               type: 'warning'
             }).then(() => {
-              this.$successMsg('进入下一张待审批订单');
-              this.detailData = res.data;
-              this.goodsList = res.data.items;
-              this.examineForm.remark = '';
+              this.$successMsg('进入下一张待审批订单')
+              this.detailData = res.data
+              this.goodsList = res.data.items
+              this.examineForm.remark = ''
             }).catch(() => {
-              this.goBack();
-              this.$parent.getList();
-            });
+              this.goBack()
+              this.$parent.getList()
+            })
           }
         }).finally(res => {
-          this.formLoading = false;
+          this.formLoading = false
         })
-      }).catch(() => {});
-    },
+      }).catch(() => {})
+    }
 
   }
 }

File diff ditekan karena terlalu besar
+ 274 - 261
src/views/supply/engin/components/home_form.vue


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini