Ver código fonte

feat: 增加是否直调选项

zh 2 anos atrás
pai
commit
3f853f28d0

+ 347 - 88
src/views/supply/pickup/components/pickup_form.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="detail-container">
-    <el-page-header @back="goBack" :content="listItem ? (flag ? '详情' : '编辑') : '新增'"></el-page-header>
-    <el-divider></el-divider>
+    <el-page-header :content="listItem ? (flag ? '详情' : '编辑') : '新增'" @back="goBack" />
+    <el-divider />
 
     <div>
       <el-form
@@ -22,11 +22,11 @@
                 :disabled="!!listItem"
               >
                 <el-option
-                  :label="item.name"
-                  :value="item.id"
                   v-for="(item, index) in warehouseList"
                   :key="index"
-                ></el-option>
+                  :label="item.name"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -38,15 +38,14 @@
           <el-col :xs="24" :sm="12" :lg="8" style="height: 51px">
             <el-form-item label="预约日期" prop="date">
               <el-date-picker
-                :disabled="flag"
                 v-model="mainForm.date"
+                :disabled="flag"
                 type="date"
                 value-format="yyyy-MM-dd"
                 style="width: 100%"
                 :picker-options="setDisabled"
                 placeholder="选择日期"
-              >
-              </el-date-picker>
+              />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="12" style="height: 51px">
@@ -63,36 +62,36 @@
             <el-form-item label="提货方式" prop="pickupWay">
               <el-radio-group v-model="mainForm.pickupWay" :disabled="flag">
                 <el-radio
-                  :label="item.dictCode"
                   v-for="(item, index) in pickupWayList"
                   :key="index"
+                  :label="item.dictCode"
                   :disabled="item.disabled"
-                  >{{ item.dictValue }}
+                >{{ item.dictValue }}
                 </el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="8">
-            <el-form-item label="提货人" prop="pickupMan" v-if="mainForm.pickupWay == '1'">
+            <el-form-item v-if="mainForm.pickupWay == '1'" label="提货人" prop="pickupMan">
               <el-select v-model="mainForm.pickupMan" placeholder="全部" :disabled="flag" style="width: 100%">
                 <el-option
-                  :label="item.takerName"
-                  :value="item.id"
                   v-for="(item, index) in pickupManList"
                   :key="index"
-                ></el-option>
+                  :label="item.takerName"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="8" v-if="mainForm.pickupWay == '1'">
+          <el-col v-if="mainForm.pickupWay == '1'" :xs="24" :sm="12" :lg="8">
             <el-form-item label="提货车辆" prop="pickupCar">
               <el-select v-model="mainForm.pickupCar" placeholder="全部" style="width: 100%" :disabled="flag">
                 <el-option
-                  :label="item.carBrand"
-                  :value="item.id"
                   v-for="(item, index) in pickupCarList"
                   :key="index"
-                ></el-option>
+                  :label="item.carBrand"
+                  :value="item.id"
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -101,17 +100,17 @@
               <el-form-item label="物流公司" prop="company">
                 <el-select
                   v-model="mainForm.logisticsId"
-                  @change="getLogisticsId"
                   placeholder="全部"
                   style="width: 100%"
                   :disabled="flag"
+                  @change="getLogisticsId"
                 >
                   <el-option
-                    :label="item.logisticsCompany"
-                    :value="item.id"
                     v-for="(item, index) in companyList"
                     :key="index"
-                  ></el-option>
+                    :label="item.logisticsCompany"
+                    :value="item.id"
+                  />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -136,7 +135,7 @@
           </template>
           <el-col :xs="24" :sm="12" :lg="8">
             <el-form-item label="备注" prop="remark">
-              <el-input v-model="mainForm.remark" placeholder="请输入备注" :disabled="flag"></el-input>
+              <el-input v-model="mainForm.remark" placeholder="请输入备注" :disabled="flag" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -182,7 +181,7 @@
           @select="handleSelect"
           @select-all="handleSelectAll"
         >
-          <el-table-column align="center" type="selection" width="55"></el-table-column>
+          <el-table-column align="center" type="selection" width="55" />
 
           <template v-if="logisticsNumber === '001' && mainForm.pickupWay == 2">
             <el-table-column align="left" label="仓库" prop="invoiceId" min-width="160" show-overflow-tooltip>
@@ -196,8 +195,7 @@
                   size="mini"
                   @change="storeChange($event, row)"
                 >
-                  <el-option v-for="item in storeList" :key="item.value" :label="item.label" :value="item.value">
-                  </el-option>
+                  <el-option v-for="item in storeList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </template>
             </el-table-column>
@@ -205,25 +203,25 @@
               <template slot-scope="scope">
                 <el-input
                   v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
-                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   v-model="scope.row.receivingName"
+                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   size="mini"
                   @input="handleInput($event, scope.row.invoiceId, 1)"
-                ></el-input>
+                />
                 <template v-else>
                   <template v-if="listItem">
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.receivingName"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                   <template v-else>
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.refLinkman"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                 </template>
               </template>
@@ -232,25 +230,25 @@
               <template slot-scope="scope">
                 <el-input
                   v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
-                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   v-model="scope.row.phone"
+                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   size="mini"
                   @input="handleInput($event, scope.row.invoiceId, 2)"
-                ></el-input>
+                />
                 <template v-else>
                   <template v-if="listItem">
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.phone"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                   <template v-else>
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.refPhone"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                 </template>
               </template>
@@ -259,25 +257,25 @@
               <template slot-scope="scope">
                 <el-input
                   v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
-                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   v-model="scope.row.address"
+                  :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                   size="mini"
                   @input="handleInput($event, scope.row.invoiceId, 3)"
-                ></el-input>
+                />
                 <template v-else>
                   <template v-if="listItem">
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.address"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                   <template v-else>
                     <el-input
-                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       v-model="scope.row.refInstallAddress"
+                      :disabled="flag || scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null"
                       size="mini"
-                    ></el-input>
+                    />
                   </template>
                 </template>
               </template>
@@ -290,7 +288,7 @@
             prop="invoiceId"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="left" label="单据日期" prop="orderTime" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.orderTime | dateToDayFilter }}
@@ -299,20 +297,20 @@
           <el-table-column align="left" label="销售订单号" prop="mainOrderId" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton
-                :copyText="
+                :copy-text="
                   scope.row.orderType === 'TRADE' ||
-                  scope.row.orderType === 'HOME' ||
-                  scope.row.orderType === 'REQUISITION_TRADE' ||
-                  scope.row.orderType === 'REQUISITION_HOME'
+                    scope.row.orderType === 'HOME' ||
+                    scope.row.orderType === 'REQUISITION_TRADE' ||
+                    scope.row.orderType === 'REQUISITION_HOME'
                     ? scope.row.enginOrderNo
                     : scope.row.mainOrderId
                 "
               />
               <span>{{
                 scope.row.orderType === 'TRADE' ||
-                scope.row.orderType === 'HOME' ||
-                scope.row.orderType === 'REQUISITION_TRADE' ||
-                scope.row.orderType === 'REQUISITION_HOME'
+                  scope.row.orderType === 'HOME' ||
+                  scope.row.orderType === 'REQUISITION_TRADE' ||
+                  scope.row.orderType === 'REQUISITION_HOME'
                   ? scope.row.enginOrderNo
                   : scope.row.mainOrderId
               }}</span>
@@ -325,45 +323,48 @@
             prop="saleTypeName"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="left"
             label="物料编码"
             prop="materialCode"
             min-width="160"
             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="160"
             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="right"
             label="数量"
             prop="refundableQty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column fixed="right" label="操作" width="100" v-if="flag && mainForm.pickupWay == '2'">
+          />
+          <el-table-column v-if="flag && mainForm.pickupWay == '2'" fixed="right" label="操作" width="250">
             <template slot-scope="scope">
-              <el-button @click="handLogistics(scope.row)" type="text" size="small">物流信息</el-button>
+              <el-button type="text" size="small" @click="handLogistics(scope.row)">物流信息</el-button>
+              <el-button type="text" size="small" @click="getListCostBillV2(scope.row)">物流费用</el-button>
+              <el-button type="text" size="small" @click="getListCodeV2(scope.row)">出库条码</el-button>
+
             </template>
           </el-table-column>
         </el-table>
@@ -371,10 +372,14 @@
     </div>
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" v-if="!flag" :loading="formLoading"
-          >{{ formLoading ? '提交中 ...' : '提 交' }}
+        <el-button
+          v-if="!flag"
+          type="primary"
+          :loading="formLoading"
+          @click="clickSubmitForm"
+        >{{ formLoading ? '提交中 ...' : '提 交' }}
         </el-button>
-        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px" v-if="!listItem">
+        <el-popconfirm v-if="!listItem" title="确定重置吗?" style="margin-left: 10px" @onConfirm="resetForm">
           <el-button slot="reference">重 置</el-button>
         </el-popconfirm>
       </div>
@@ -384,15 +389,15 @@
       append-to-body
       :visible.sync="visible"
       width="60%"
-      @close="onClose"
       :close-on-click-modal="false"
+      @close="onClose"
     >
-      <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
+      <el-timeline v-if="logisticsDetail.length" class="logistics" :reverse="false">
         <el-timeline-item
-          placement="top"
-          type="success"
           v-for="(item, index) in logisticsDetail"
           :key="index"
+          placement="top"
+          type="success"
           :timestamp="item.time"
         >
           <el-row :gutter="20">
@@ -408,6 +413,36 @@
       </el-timeline>
       <div v-else class="tip">暂无物流信息</div>
     </el-dialog>
+    <el-dialog
+      title="物流费用"
+      append-to-body
+      :visible.sync="logisticsVisible"
+      width="60%"
+      :close-on-click-modal="false"
+      @close="onClose"
+    >
+      <zj-table
+        :table-attributes="defaultTableAttributes"
+        :is-drop="true"
+        :columns="formLogistics"
+        :table-data="logisticsData"
+      />
+    </el-dialog>
+    <el-dialog
+      title="出库条码"
+      append-to-body
+      :visible.sync="outboundVisible"
+      width="60%"
+      :close-on-click-modal="false"
+      @close="onClose"
+    >
+      <zj-table
+        :table-attributes="defaultTableAttributes"
+        :is-drop="true"
+        :columns="formOutbound"
+        :table-data="outboundData"
+      />
+    </el-dialog>
   </div>
 </template>
 
@@ -424,9 +459,10 @@ import {
   checkStock,
   getListOrderTrack
 } from '@/api/supply/pickup'
+import { getListCostBillV2 } from '@/api/logisticsBill'
+import { getListCodeV2 } from '@/api/barcode'
 import { getDictList } from '@/api/common'
 import { mapGetters } from 'vuex'
-
 export default {
   name: 'PickupForm',
   componentName: 'PickupForm',
@@ -469,6 +505,13 @@ export default {
       pickupManList: [],
       pickupCarList: [],
       companyList: [],
+      defaultTableAttributes: {
+        border: true,
+        headerCellClassName: 'headerRowColor',
+        size: 'mini',
+        'summary-method': this.$getSummaries,
+        'show-summary': true
+      },
       logisticsNumber: '',
       storeList: [
         {
@@ -490,12 +533,16 @@ export default {
         }
       },
       visible: false,
+      logisticsVisible:false,
+      outboundVisible:false,
       orderId: '',
       logisticsDetail: [],
       frontPickType: null,
       isFront: null,
       isPick: null,
-      isPickUpGoods: false
+      isPickUpGoods: false,
+      logisticsData: [],
+      outboundData: []
     }
   },
 
@@ -509,18 +556,191 @@ export default {
         openSidebar: this.sidebar.opened
       }
     },
-    ...mapGetters(['userInfo'])
-    // comDisabled() {
-    //   return id => {
-    //     if (this.isFront === false && id === '1574563841707114498') {
-    //       return true
-    //     }
-    //     if (this.isFront === true && id !== '1574563841707114498') {
-    //       return true
-    //     }
-    //     return false
-    //   }
-    // }
+    ...mapGetters(['userInfo']),
+    formLogistics() {
+      return [
+        {
+          columnAttributes: {
+            label: '序号',
+            prop: 'materialName',
+            type: 'index'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '调拨单号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '嘉贤单据号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '存货编码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料代码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品名称',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '规格型号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '单价',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '数量',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物流费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '仓储费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '合计费用',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '对账人',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '对账日期',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算人',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '结算日期',
+            prop: 'materialName'
+          }
+        }
+      ]
+    },
+    formOutbound() {
+      return [
+        {
+          columnAttributes: {
+            label: '序号',
+            prop: 'materialName',
+            type: 'index'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '条码状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '签收状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '上墙状态',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料代码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品名称',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '规格型号',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '内外机',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '物料条码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '出库条形码',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '签收日期',
+            prop: 'materialName'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '上增日期',
+            prop: 'materialName'
+          }
+        }
+      ]
+    }
   },
 
   created() {
@@ -608,7 +828,7 @@ export default {
     // 获取详情
     getDetail() {
       getDetail({ id: this.listItem.id }).then(res => {
-        let data = res.data
+        const data = res.data
         this.mainForm.warehouse = data.correspondId
         this.mainForm.date = data.pickTime.slice(0, 10)
         this.mainForm.timeSlot = Number(data.pickStatus)
@@ -824,7 +1044,7 @@ export default {
           }
           for (let i = 0; i < this.tableSelection.length; i++) {
             if (this.tableSelection[i].warehouseFlag == 2) {
-              let el = this.tableSelection[i]
+              const el = this.tableSelection[i]
               if (!(el.orderType === 'TRADE' || el.orderType === 'HOME')) {
                 if (!(el.receivingName && el.phone && el.address)) {
                   return this.$errorMsg('商家仓必须填写收货地址、电话、收货地址')
@@ -843,11 +1063,11 @@ export default {
             }
           }
 
-          let orderList = []
+          const orderList = []
           this.tableSelection.forEach(item => {
             orderList.push(item.invoiceOrderId)
           })
-          let params = {
+          const params = {
             correspondId: this.mainForm.warehouse,
             pickTime: this.mainForm.date + ' 00:00:00',
             invoiceOrderIds: orderList.join(',')
@@ -879,7 +1099,7 @@ export default {
       }
       // let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
 
-      let orderList = []
+      const orderList = []
 
       this.tableSelection.forEach(item => {
         if (!(item.orderType === 'TRADE' || item.orderType === 'HOME')) {
@@ -911,7 +1131,7 @@ export default {
           status: item.status
         })
       })
-      let params = {
+      const params = {
         correspondId: this.mainForm.warehouse,
         // correspondName,
         pickTime: this.mainForm.date + ' 00:00:00',
@@ -955,7 +1175,42 @@ export default {
           })
       }
     },
-
+    getListCostBillV2(row) {
+      this.logisticsVisible = true
+      getListCostBillV2({
+        pageNum: 1,
+        pageSize: -1,
+        params: [
+          {
+            param: 'order_code',
+            compare: '=',
+            value: row.invoiceId 
+          }
+        ]
+      }).then(res => {
+        res.data.records.forEach(item => {
+          item.sums1 = ['orderHasSendQty', 'subsidyCoefficient', 'unloadUpstairsCoefficient', 'coefficient']
+          item.sums2 = ['cost', 'unitPrice', 'totalCost', 'allowanceCost']
+        })
+        this.logisticsData = res.data.records
+      })
+    },
+    getListCodeV2(row) {
+      this.outboundVisible = true
+      getListCodeV2({
+        pageNum: 1,
+        pageSize: -1,
+        params: [
+          {
+            param: 'order_number',
+            compare: '=',
+            value: row.invoiceId 
+          }
+        ]
+      }).then(res => {
+        this.outboundData = res.data.records
+      })
+    },
     resetForm() {
       this.$refs.mainForm.resetFields()
       // if (this.isFront === true) {
@@ -975,8 +1230,12 @@ export default {
     },
     onClose() {
       this.logisticsDetail = []
+      this.outboundData = []
+      this.logisticsData = []
       this.orderId = ''
       this.visible = false
+      this.logisticsVisible = false
+      this.outboundVisible = false
     }
   }
 }

+ 37 - 29
src/views/supply/pickup/pickup_list.vue

@@ -1,13 +1,13 @@
 <template>
   <template-page
     ref="pageRef"
-    :getList="getList"
+    :get-list="getList"
     :operation="operation()"
-    :optionsEvensGroup="optionsEvensGroup"
-    :exportList="exportList"
-    :columnParsing="columnParsing"
-    :tableAttributes="tableAttributes"
-    :tableEvents="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :export-list="exportList"
+    :column-parsing="columnParsing"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
   >
     <Popu v-if="isShowForm">
       <PickupForm :list-item="queryItem" :flag="flag" @backListFormDetail="backList" />
@@ -112,7 +112,11 @@ export default {
     // this.getWarehouseList()
     // this.getPickupManList()
   },
-
+  activated() {
+    if (this.$route.query && this.$route.query.id) {
+      this.toForm({ id: this.$route.query.id }, true)
+    }
+  },
   methods: {
     // 列表请求函数
     getList: pickListV2,
@@ -129,11 +133,11 @@ export default {
     operation() {
       return (h, { row, index, column }) => {
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             <el-button
-              size="mini"
-              type="text"
-              onClick={async () => {
+              size='mini'
+              type='text'
+              onClick={async() => {
                 this.toForm(row, true)
               }}
             >
@@ -142,9 +146,9 @@ export default {
 
             {this.$checkBtnRole('edit', this.$route.meta.roles) && !row.printNum ? (
               <el-button
-                size="mini"
-                type="text"
-                onClick={async () => {
+                size='mini'
+                type='text'
+                onClick={async() => {
                   this.toForm(row)
                 }}
               >
@@ -156,19 +160,19 @@ export default {
 
             {this.$checkBtnRole('cancel', this.$route.meta.roles) &&
             ((this.isDealer && !row.printNum) || !this.isDealer) ? (
-              <el-popconfirm
-                onOnConfirm={async () => {
-                  this.handleCancel(row.id)
-                }}
-                title={`是否确定需要${row.printNum ? '作废' : '取消'}该项内容?`}
-              >
-                <el-button slot="reference" size="mini" type="text">
-                  {row.printNum ? '作废' : '取消'}
-                </el-button>
-              </el-popconfirm>
-            ) : (
-              ''
-            )}
+                <el-popconfirm
+                  onOnConfirm={async() => {
+                    this.handleCancel(row.id)
+                  }}
+                  title={`是否确定需要${row.printNum ? '作废' : '取消'}该项内容?`}
+                >
+                  <el-button slot='reference' size='mini' type='text'>
+                    {row.printNum ? '作废' : '取消'}
+                  </el-button>
+                </el-popconfirm>
+              ) : (
+                ''
+              )}
           </div>
         )
       }
@@ -260,9 +264,13 @@ export default {
     },
 
     backList() {
-      this.queryItem = {}
       this.isShowForm = false
-      this.$refs.pageRef.refreshList()
+      if (this.$route.query && this.$route.query.id) {
+        this.$router.push('/supply/pickup/sum_list')
+      } else {
+        this.queryItem = {}
+        this.$refs.pageRef.refreshList()
+      }
     },
 
     // 取消/作废

+ 24 - 14
src/views/supply/pickup/sum_list.vue

@@ -1,21 +1,21 @@
 <template>
   <template-page
     ref="pageRef"
-    :getList="getList"
-    :exportList="exportList"
+    :get-list="getList"
+    :export-list="exportList"
     :operation="operation()"
-    :optionsEvensGroup="optionsEvensGroup"
-    :columnParsing="columnParsing"
-    :defaultSearchData="searchData"
-    :replaceOrNotMap="false"
+    :options-evens-group="optionsEvensGroup"
+    :column-parsing="columnParsing"
+    :default-search-data="searchData"
+    :replace-or-not-map="false"
   >
-    <el-dialog title="物流信息" :visible.sync="visible" width="60%" @close="onClose" :close-on-click-modal="false">
-      <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
+    <el-dialog title="物流信息" :visible.sync="visible" width="60%" :close-on-click-modal="false" @close="onClose">
+      <el-timeline v-if="logisticsDetail.length" class="logistics" :reverse="false">
         <el-timeline-item
-          placement="top"
-          type="success"
           v-for="(item, index) in logisticsDetail"
           :key="index"
+          placement="top"
+          type="success"
           :timestamp="item.time"
         >
           <el-row :gutter="20">
@@ -94,13 +94,13 @@ export default {
       orderId: '',
       logisticsDetail: [],
       flag: false,
-      searchData: this.$route.query.id?[
+      searchData: this.$route.query.id ? [
         {
           param: 'pms.invoice_id',
           compare: '=',
           value: this.$route.query.id || ''
         }
-      ]:[]
+      ] : []
     }
   },
   watch: {
@@ -140,12 +140,22 @@ export default {
     operation() {
       return (h, { row, index, column }) => {
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             {row.pickType != '1' ? (
-              <el-button onClick={() => this.handLogistics(row)} type="text" size="small">
+              <el-button onClick={() => this.handLogistics(row)} type='text' size='small'>
                 物流信息
               </el-button>
             ) : null}
+            <el-button onClick={() => {
+              this.$router.push({
+                path: '/supply/pickup/pickup_list',
+                query: {
+                  id: row.id
+                }
+              })
+            }} type='text' size='small'>
+                详情
+            </el-button>
           </div>
         )
       }

+ 2 - 0
src/views/supply/policy/components/retail_detail.vue

@@ -130,6 +130,8 @@
             </template>
           </el-table-column>
           <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+
           <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalAmount | numToFixed }}

+ 2 - 0
src/views/supply/policy/components/retail_examine.vue

@@ -142,6 +142,8 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip />
+
         <el-table-column
           align="center"
           label="订单金额"

+ 9 - 0
src/views/supply/policy/components/retail_form.vue

@@ -73,6 +73,14 @@
             </el-radio-group>
           </el-form-item>
         </el-col>
+        <el-col :span="24" :sm="12" :lg="12" v-if="goodsList.length && commercialType">
+          <el-form-item label="是否直调" prop="isPlanOrder">
+            <el-radio-group v-model="mainForm.isPlanOrder">
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
         <!--        <el-col :span="24" :sm="12" :lg="12" >-->
         <!--          <el-form-item label="计划单" prop="isPlanOrder">-->
         <!--            <el-radio-group v-model="mainForm.isPlanOrder">-->
@@ -141,6 +149,7 @@
             <el-input v-model="scope.row.qty" class="yinput" size="small" />
           </template>
         </el-table-column>
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip />
         <el-table-column align="right" label="订单金额" min-width="100" prop="compute_amount" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ (scope.row.price * scope.row.qty) | numToFixed }}

+ 2 - 0
src/views/supply/policy/components/retail_return.vue

@@ -112,6 +112,8 @@
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+
         <el-table-column
           align="center"
           label="订单金额"

+ 72 - 72
src/views/supply/retail/components/retail_detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="detail-container">
     <div v-show="!isShowCheckOrder">
-      <el-page-header @back="goBack" content="详情"></el-page-header>
+      <el-page-header content="详情" @back="goBack" />
 
       <div class="main-title">
         <div class="title">提货进度</div>
@@ -11,7 +11,7 @@
           :text-inside="true"
           :stroke-width="26"
           :percentage="detailData.thjd ? (detailData.thjd * 1000) / 10 : 0"
-        ></el-progress>
+        />
       </div>
 
       <div class="main-title">
@@ -91,56 +91,56 @@
           show-summary
           :summary-method="$getSummaries"
         >
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50" />
           <el-table-column
             align="left"
             label="销售类型"
             prop="saleTypeName"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="left"
             label="物料编码"
             prop="materialCode"
             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="160"
             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="fileNo"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.price | numToFixed }}
@@ -152,7 +152,9 @@
             prop="qty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
+          <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip />
+
           <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalAmount | numToFixed }}
@@ -164,7 +166,7 @@
             prop="customerWalletName2"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="right" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payRebateAmount | numToFixed }}
@@ -181,7 +183,7 @@
             prop="customerWalletName"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.payAmount | numToFixed }}
@@ -198,28 +200,28 @@
             prop="directTransferQty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="right"
             label="原订单数量"
             prop="oldQty"
             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="tax"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
         </el-table>
       </div>
 
@@ -252,19 +254,17 @@
           <el-button type="success" @click="toCheckOrder">联查单据</el-button>
           <!-- <el-button type="primary" @click="openDirectDialog" :disabled="detailData.examineStatus !== 'OK'" v-if="!isDealer">提前开票</el-button> -->
           <el-button
+            v-if="!isDealer"
             type="primary"
-            @click="openDeliverDialog"
             :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus === true"
-            v-if="!isDealer"
-            >直调发货</el-button
-          >
+            @click="openDeliverDialog"
+          >直调发货</el-button>
           <el-button
+            v-if="!isDealer"
             type="primary"
-            @click="handleFinish"
             :disabled="detailData.examineStatus !== 'OK' || detailData.directTransferStatus"
-            v-if="!isDealer"
-            >直调完成</el-button
-          >
+            @click="handleFinish"
+          >直调完成</el-button>
           <el-button @click="goBack">返回列表</el-button>
         </div>
       </div>
@@ -296,13 +296,13 @@
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="选择仓位" prop="position">
               <el-select v-model="deliverForm.position" placeholder="请选择仓位" style="width: 100%" filterable>
-                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="发货申请备注" prop="remark">
-              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable></el-input>
+              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable />
             </el-form-item>
           </el-col>
         </el-row>
@@ -318,42 +318,42 @@
           stripe
           max-height="400"
         >
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50" />
           <el-table-column
             align="center"
             label="销售类型"
             prop="saleTypeName"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="物料编码"
             prop="materialCode"
             min-width="120"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="产品编码"
             prop="materialOldNumber"
             min-width="120"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="产品名称"
             prop="materialName"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="规格型号"
             prop="specification"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <!-- <el-table-column align="left" label="文件编号" prop="fileNo" min-width="200" show-overflow-tooltip>
             </el-table-column> -->
           <el-table-column
@@ -362,30 +362,30 @@
             prop="unit"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="right"
             label="订单数量"
             prop="qty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="right"
             label="发货数量"
             prop="hasSendQty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="right" label="直调数量" prop="adjustNum" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.adjustNum"
                 size="small"
                 type="number"
-                @mousewheel.native.prevent
                 :disabled="!scope.row.isDirectTransfer || scope.row.adjustNum === 0"
-              ></el-input>
+                @mousewheel.native.prevent
+              />
             </template>
           </el-table-column>
           <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
@@ -414,7 +414,7 @@
             prop="remark"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -447,7 +447,7 @@
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
-                ></el-option>
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -460,7 +460,7 @@
                 filterable
                 @change="changePosition1"
               >
-                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -478,7 +478,7 @@
                   :key="item.id"
                   :label="item.name"
                   :value="item.id"
-                ></el-option>
+                />
               </el-select>
             </el-form-item>
           </el-col>
@@ -491,7 +491,7 @@
                 filterable
                 @change="changePosition2"
               >
-                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -508,98 +508,98 @@
           stripe
           max-height="400"
         >
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50" />
           <el-table-column
             align="center"
             label="销售类型"
             prop="saleTypeName"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="产品编码"
             prop="materialCode"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="物料代码"
             prop="materialOldNumber"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="产品名称"
             prop="materialName"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="规格型号"
             prop="specification"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="单位"
             prop="unit"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="数量"
             prop="qty"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调出仓库"
             prop="warehouse1"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调出仓位"
             prop="position1"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调入仓库"
             prop="warehouse2"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调入仓位"
             prop="position2"
             min-width="100"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调出库存状态"
             prop="status1"
             min-width="110"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="调入库存状态"
             prop="status2"
             min-width="110"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column align="center" label="调出货主" min-width="100" show-overflow-tooltip>
             <template slot-scope="">弘格</template>
           </el-table-column>
@@ -612,7 +612,7 @@
             prop="remark"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -621,7 +621,7 @@
       </span>
     </el-dialog>
 
-    <CheckOrder :checkOrderId="checkOrderId" v-if="isShowCheckOrder" @backDetail="backDetail" />
+    <CheckOrder v-if="isShowCheckOrder" :check-order-id="checkOrderId" @backDetail="backDetail" />
   </div>
 </template>
 
@@ -642,7 +642,6 @@ export default {
   components: {
     CheckOrder
   },
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -651,10 +650,11 @@ export default {
         { label: '审核通过', value: 'OK' }
         // { label: '审核驳回', value: 'FAIL' },,
       ]
-      let obj = statusList.find(o => o.value == val)
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
       detailData: {},
@@ -801,13 +801,13 @@ export default {
               return
             }
           }
-          let goodsList = this.goodsList.map(item => {
+          const goodsList = this.goodsList.map(item => {
             return {
               itemId: item.id,
               qty: item.adjustNum || 0
             }
           })
-          let params = {
+          const params = {
             orderNo: this.listItem.id,
             orderDate: '',
             remark: this.deliverForm.remark,
@@ -844,7 +844,7 @@ export default {
     // 更改调出仓库
     changeWarehouse1() {
       this.directForm.position1 = ''
-      let obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+      const obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
       this.positionList1 = obj.kingDeeStocks
       this.directGoodsList.forEach(item => {
         item.warehouse1 = obj.name
@@ -854,7 +854,7 @@ export default {
     // 更改调入仓库
     changeWarehouse2() {
       this.directForm.position2 = ''
-      let obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+      const obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
       this.positionList2 = obj.kingDeeStocks
       this.directGoodsList.forEach(item => {
         item.warehouse2 = obj.name
@@ -863,7 +863,7 @@ export default {
 
     // 更改调出仓位
     changePosition1() {
-      let obj = this.positionList1.find(o => o.id == this.directForm.position1)
+      const obj = this.positionList1.find(o => o.id == this.directForm.position1)
       this.directGoodsList.forEach(item => {
         item.position1 = obj.name
         item.status1 = obj.defStockStatusName
@@ -872,7 +872,7 @@ export default {
 
     // 更改调入仓位
     changePosition2() {
-      let obj = this.positionList2.find(o => o.id == this.directForm.position2)
+      const obj = this.positionList2.find(o => o.id == this.directForm.position2)
       this.directGoodsList.forEach(item => {
         item.position2 = obj.name
         item.status2 = obj.defStockStatusName
@@ -895,11 +895,11 @@ export default {
     submitDirectForm() {
       this.$refs.directForm.validate(valid => {
         if (valid) {
-          let warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
-          let positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
-          let warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
-          let positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
-          let params = {
+          const warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+          const positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
+          const warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+          const positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
+          const params = {
             orderNo: this.detailData.id,
             orderType: 'RETAIL', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
             correspondId: this.directForm.warehouse1,

+ 25 - 23
src/views/supply/retail/components/retail_examine.vue

@@ -1,9 +1,9 @@
 <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">订单信息 <span style="margin-left: 20px">经销商名称:{{detailData.customerName}}</span></div>
+      <div class="title">订单信息 <span style="margin-left: 20px">经销商名称:{{ detailData.customerName }}</span></div>
     </div>
 
     <div class="diy-table-1">
@@ -27,7 +27,7 @@
         <el-col :span="16" class="item">
           <div class="label">文件编号</div>
           <div class="value">
-            <el-input v-model="detailData.fileNo" placeholder="填写文件编号" clearable></el-input>
+            <el-input v-model="detailData.fileNo" placeholder="填写文件编号" clearable />
             <!-- {{ detailData.fileNo }} -->
           </div>
         </el-col>
@@ -35,7 +35,7 @@
           <div class="label">备注</div>
           <div class="value">
             <template v-if="userName">
-              <el-input v-model="detailData.remark" placeholder="填写备注" clearable></el-input>
+              <el-input v-model="detailData.remark" placeholder="填写备注" clearable />
             </template>
             <template v-else>
               {{ detailData.remark }}
@@ -73,56 +73,58 @@
         show-summary
         :summary-method="$getSummaries"
       >
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50" />
         <el-table-column
           align="left"
           label="销售类型"
           prop="saleTypeName"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="物料编码"
           prop="materialCode"
           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="160"
           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="unit" min-width="100" show-overflow-tooltip />
         <el-table-column
           align="left"
           label="文件编号"
           prop="fileNo"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip />
+
         <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
@@ -134,7 +136,7 @@
           prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payRebateAmount | numToFixed }}
@@ -151,7 +153,7 @@
           prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
@@ -168,22 +170,22 @@
           prop="directTransferQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="right"
           label="原订单数量"
           prop="oldQty"
           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="tax" min-width="100" show-overflow-tooltip></el-table-column>
+        />
+        <el-table-column align="right" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -208,7 +210,7 @@
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
           <div class="value">
-            <el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input>
+            <el-input v-model="mainForm.remark" placeholder="请输入内容" />
           </div>
         </el-col>
       </el-row>
@@ -216,7 +218,7 @@
 
     <div class="page-footer">
       <div class="footer">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{
+        <el-button type="primary" :loading="formLoading" @click="clickSubmitForm">{{
           formLoading ? '提交中 ...' : '提 交'
         }}</el-button>
         <el-button @click="goBack">返回列表</el-button>
@@ -231,7 +233,6 @@ import { getDetail, examineData } from '@/api/supply/retail'
 export default {
   name: 'RetailExamine',
   componentName: 'RetailExamine',
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -240,10 +241,11 @@ export default {
         { label: '审核通过', value: 'OK' }
         // { label: '审核驳回', value: 'FAIL' },,
       ]
-      let obj = statusList.find(o => o.value == val)
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
       detailData: {},

+ 19 - 12
src/views/supply/retail/components/retail_form.vue

@@ -73,14 +73,22 @@
             <el-input v-model="mainForm.remark" placeholder="请输入表头备注" />
           </el-form-item>
         </el-col>
-<!--        <el-col :span="24" :sm="12" :lg="12">-->
-<!--          <el-form-item label="计划单" prop="isPlanOrder">-->
-<!--            <el-radio-group v-model="mainForm.isPlanOrder">-->
-<!--              <el-radio :label="true">是</el-radio>-->
-<!--              <el-radio :label="false">否</el-radio>-->
-<!--            </el-radio-group>-->
-<!--          </el-form-item>-->
-<!--        </el-col>-->
+        <el-col :span="24" :sm="12" :lg="12">
+          <el-form-item label="是否直调" prop="isPlanOrder">
+            <el-radio-group v-model="mainForm.isPlanOrder">
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <!--        <el-col :span="24" :sm="12" :lg="12">-->
+        <!--          <el-form-item label="计划单" prop="isPlanOrder">-->
+        <!--            <el-radio-group v-model="mainForm.isPlanOrder">-->
+        <!--              <el-radio :label="true">是</el-radio>-->
+        <!--              <el-radio :label="false">否</el-radio>-->
+        <!--            </el-radio-group>-->
+        <!--          </el-form-item>-->
+        <!--        </el-col>-->
       </el-row>
     </el-form>
 
@@ -197,6 +205,7 @@
             <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip />
         <el-table-column align="right" label="订单金额" prop="compute_amount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ (scope.row.price * scope.row.qty) | numToFixed }}
@@ -311,7 +320,7 @@
             <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
           </template>
         </el-table-column>
-      </el-table>
+        </el-table-column></el-table>
     </div>
 
     <div class="page-footer">
@@ -910,7 +919,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getGoodsList()
     },
@@ -1117,13 +1126,11 @@ export default {
             editData(params).then(res => {
               this.$successMsg('编辑成功')
               this.goBack()
-              
             })
           } else {
             addData(params).then(res => {
               this.$successMsg('添加成功')
               this.goBack()
-              
             })
           }
         }

+ 2 - 0
src/views/supply/retail/components/retail_return.vue

@@ -112,6 +112,8 @@
           </template>
         </el-table-column>
         <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="退订数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+
         <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}