FengChaoYu il y a 3 ans
Parent
commit
13922b9cf1
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      src/views/supply/engin/components/home_form.vue

+ 7 - 2
src/views/supply/engin/components/home_form.vue

@@ -766,12 +766,17 @@ export default {
 
     // 选择工程登录
     async chooseItem(id, uid, isChangeSaleType = false) {
+      let isCustomer = JSON.parse(localStorage.getItem("supply_user")).isCustomer
+      let customerId = JSON.parse(localStorage.getItem("supply_user")).customerId
+      if (!isCustomer) {
+        customerId = this.mainForm.customerId
+      }
       getHomeLoginDetail({
         recordNo: id,
         saleTypeId: this.mainForm.saleType,
         userId: uid,
         enginOrderId: this.mainForm.orderNum,
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId
+        customerId: customerId
       }).then(async res => {
         // 复制当前明细数据
         let copyGoodsList = JSON.parse(JSON.stringify(this.goodsList));
@@ -1262,7 +1267,7 @@ export default {
         saleId: this.mainForm.saleType,
         billType: 'HOME',
         oldNumbers: oldNumbers.join(','),
-        customerId: this.mainForm.jxsNum
+        customerId: this.mainForm.customerId
       }).then(res => {
         console.log('请求后可选机型接口', res.data.records)
         if (!res.data.records || res.data.records.length === 0) {