Ver código fonte

Merge branch 'hotfix/Hotfix-zh-309' into develop

# Conflicts:
#	src/views/supply/pickup/components/pickup_form.vue
howie 2 anos atrás
pai
commit
2676084ed1

+ 3 - 3
src/views/finance/receivable_list.vue

@@ -69,8 +69,8 @@
                   </el-form-item>
                 </el-col>
                 <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="审核人" prop="confirmName">
-                    <el-input v-model="searchForm.confirmName" placeholder="请输入审核人" />
+                  <el-form-item label="审核人" prop="examineBy">
+                    <el-input v-model="searchForm.examineBy" placeholder="请输入审核人" />
                   </el-form-item>
                 </el-col>
               </el-row>
@@ -282,7 +282,7 @@ export default {
         userName: '',
         startTime: '',
         endTime: '',
-        confirmName: ''
+        examineBy: ''
       }, //搜索表单
       listLoading: false, // 列表加载loading
       examine: '',

+ 78 - 6
src/views/supply/pickup/components/pickup_form.vue

@@ -147,6 +147,35 @@
           @select-all="handleSelectAll"
         >
           <el-table-column align="center" type="selection" width="55"></el-table-column>
+          <template v-if="mainForm.pickupWay == 2 && logisticsNumber == '001'">
+            <el-table-column align="left" label="收货客户" prop="orderTime" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.receivingName"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 1)"
+                ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column align="left" label="电话" prop="orderTime" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.phone"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 2)"
+                ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column align="left" label="收货地址" prop="orderTime" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.address"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 3)"
+                ></el-input>
+              </template>
+            </el-table-column>
+          </template>
           <el-table-column
             align="left"
             label="发货申请单"
@@ -335,7 +364,23 @@ export default {
     goBack() {
       this.$emit('backListFormDetail')
     },
-
+    handleInput(e, id, type) {
+      console.log(e)
+      this.deliverList.forEach(k => {
+        if (k.invoiceId === id) {
+          switch (type) {
+            case 1:
+              k.receivingName = e
+              break
+            case 2:
+              k.phone = e
+              break
+            default:
+              k.address = e
+          }
+        }
+      })
+    },
     // 获取详情
     getDetail() {
       getDetail({ id: this.listItem.id }).then(res => {
@@ -349,12 +394,10 @@ export default {
         this.mainForm.company = data.pickLogistics
         this.mainForm.remark = data.remark
         this.mainForm.logisticsId = data.logisticsId
-        this.mainForm.receivingName = data.receivingName
-        this.mainForm.phone = data.phone
-        this.mainForm.address = data.address
-        this.deliverList = data.invoicePickBeans
         const item = this.companyList.find(k => k.id === data.logisticsId)
         this.logisticsNumber = item.logisticsNumber
+        this.deliverList = data.invoicePickBeans
+        console.log(this.deliverList)
       })
     },
 
@@ -410,6 +453,20 @@ export default {
       const item = this.companyList.find(k => k.id === e)
       this.mainForm.company = item.logisticsCompany
       this.logisticsNumber = item.logisticsNumber
+      if (this.logisticsNumber === '001' && this.deliverList && this.deliverList.length) {
+        this.deliverList.forEach(k => {
+          this.$set(k, 'receivingName', '')
+          this.$set(k, 'phone', '')
+          this.$set(k, 'address', '')
+        })
+      } else {
+        if (this.deliverList && !this.deliverList.length) return
+        this.deliverList.forEach(k => {
+          delete k.receivingName
+          delete k.phone
+          delete k.address
+        })
+      }
     },
     // 查询列表
     getDeliverList() {
@@ -483,7 +540,22 @@ export default {
 
       let orderList = []
       this.tableSelection.forEach(item => {
-        orderList.push(item.invoiceOrderId)
+        orderList.push({
+          address: item.address,
+          id: this.listItem ? item.id : '',
+          invoiceOrderId: item.invoiceOrderId,
+          materialCode: item.materialCode,
+          materialId: item.materialId,
+          materialName: item.materialName,
+          materialOldNumber: item.materialOldNumber,
+          phone: item.phone,
+          pickActualTime: item.pickActualTime,
+          pickId: item.pickId,
+          printNum: item.printNum,
+          printTime: item.printTime,
+          receivingName: item.receivingName,
+          status: item.status
+        })
       })
       let params = {
         correspondId: this.mainForm.warehouse,