Explorar el Código

fix: 商家销售

zh hace 2 años
padre
commit
61de2b322a

+ 16 - 1
src/api/barcode.js

@@ -7,6 +7,21 @@ export function getListCodeV2(params) {
   })
 }
 
+export function getListInstallCodeV2(params) {
+  return request({
+    url: `/customer/install/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportInstallListCodeV2(data, name) {
+  return postBlob({
+    url: '/customer/install/list/export',
+    data,
+    name
+  })
+}
+
 export function exportListCodeV2(data, name) {
   return postBlob({
     url: '/customer/code/user/export/v2',
@@ -85,4 +100,4 @@ export function exportListDaCangV2(data, name) {
     data,
     name
   })
-}
+}

+ 7 - 0
src/api/logisticsBill.js

@@ -40,3 +40,10 @@ export function exportListSubCostBillV2(data, name) {
   })
 }
 
+export function getInstalDetail(params) {
+  return request({
+    url: '/customer/install/detail',
+    method: 'get',
+    params
+  })
+}

+ 300 - 6
src/components/LogisticsTabs/index.vue

@@ -22,7 +22,7 @@
             :timestamp="item.time"
           >
             <el-row :gutter="20">
-              <el-col class="logistics-title"> {{ statusObj[item.status].label }} </el-col>
+              <el-col class="logistics-title"> {{ item && item.status && statusObj[item.status].label }} </el-col>
               <el-col>
                 <div class="flex">
                   <div>{{ item.comment }}</div>
@@ -56,12 +56,111 @@
       </div>
       <zj-table :is-drop="true" :columns="formOutbound" :table-data="outboundData" />
     </el-card>
+    <el-card v-if="curTarget === 4 && tabsList[curTarget - 1].show">
+      <div slot="header">
+        <span>安装信息</span>
+      </div>
+
+      <el-form ref="installDetail" :model="installDetail" label-width="120px" :inline="false" size="mini">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="信息编码">
+              <el-input v-model="installDetail.gongDanId" style="width: 85%;" disabled /> <el-button class="tag-read" :data-clipboard-text="installDetail.gongDanId" type="primary" size="mini" @click="copy">复制</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="创建网点名称">
+              <el-input v-model="installDetail.createWname" style="width: 85%;" disabled /><el-button class="tag-read" :data-clipboard-text="installDetail.createWname" type="primary" size="mini" @click="copy">复制</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="总部信息编码">
+              <el-input v-model="installDetail.pgid" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="销售服务网点">
+              <el-input v-model="installDetail.salesWname" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="接收派工网点">
+              <el-input v-model="installDetail.afterWname" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="主要服务人员">
+              <el-input v-model="installDetail.workerName" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="联系电话">
+              <el-input v-model="installDetail.workerPhone" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="售后服务网点">
+              <el-input v-model="installDetail.installName" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="辅助服务人员">
+              <el-input v-model="installDetail.assistName" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="联系电话">
+              <el-input v-model="installDetail.assistPhone" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工单接收时间">
+              <el-input v-model="installDetail.afterTime" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工单状态">
+              <el-input v-model="orderState[installDetail.orderState || 1]" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="派工状态">
+              <el-input v-model=" appointState[installDetail.appointState || 0] " disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="完工情况">
+              <el-input v-model="installDetail.orderOver" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="跟单信息员">
+              <el-input v-model="installDetail.adminOfficerName" disabled />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工单时间">
+              <el-input v-model="installDetail.createTime" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <zj-table :is-drop="true" :columns="installInfo" :table-data=" installDetail && installDetail.logs" />
+    </el-card>
+    <el-card v-if="curTarget === 5 && tabsList[curTarget - 1].show">
+      <div slot="header">
+        <span>安装条码</span>
+      </div>
+      <zj-table :is-drop="true" :columns="formOutbound" :table-data="instalLList" />
+    </el-card>
   </div>
 </template>
 
 <script>
-import { getListCostBillV2, getOrderTrackList2 } from '@/api/logisticsBill'
-import { getListCodeV2 } from '@/api/barcode'
+import Clipboard from 'clipboard'
+import { getListCostBillV2, getOrderTrackList2, getInstalDetail } from '@/api/logisticsBill'
+import { getListCodeV2, getListInstallCodeV2 } from '@/api/barcode'
 
 export default {
   props: {
@@ -76,6 +175,14 @@ export default {
     returnShow: {
       type: Boolean,
       default: true
+    },
+    gongDanId: {
+      type: String,
+      default: null
+    },
+    details: {
+      type: Object,
+      default: () => ({})
     }
   },
   data() {
@@ -110,9 +217,13 @@ export default {
           label: '出库',
           value: 'OUT_OF_STOCK'
         },
-        ARRIVE_BRANCH: {
+        ASSIVE_BRANCH: {
           label: '到达网点',
-          value: 'ARRIVE_BRANCH'
+          value: 'ASSIVE_BRANCH'
+        },
+        ASSIGN_BRANCH: {
+          label: '指派网点',
+          value: 'ASSIGN_BRANCH'
         },
         DELIVERING: {
           label: '派送中',
@@ -139,6 +250,12 @@ export default {
           value: 'OTHER_EXCEPTION'
         }
       },
+      orderState: {
+        1: '已保存工单', 2: '待分部派工', 3: '待分中心派工', 4: '待网点派工', 5: '待审批改派', 6: '待服务人员处理', 7: '服务人员报完工', 8: '申请售后处理', 9: '已作废工单', 10: '已关闭工单', 99: '非广佛作废'
+      },
+      appointState: {
+        0: '待接收', 1: '待签到', 2: '待采集', 3: '已采集', 4: '已完工', 5: '改约中', 6: '改派中'
+      },
       defaultTableAttributes: {
         height: '100%',
         border: true,
@@ -148,7 +265,9 @@ export default {
       },
       logisticsData: [],
       outboundData: [],
-      logisticsDetail: []
+      logisticsDetail: [],
+      installDetail: {},
+      instalLList: []
     }
   },
   computed: {
@@ -581,9 +700,160 @@ export default {
           }
         }
       ]
+    },
+    installInfo() {
+      return [
+        {
+          columnAttributes: {
+            label: '操作类别',
+            prop: 'type',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '操作内容',
+            prop: 'content',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '最后操作时间',
+            prop: 'updatetime',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '操作人',
+            prop: 'operator',
+            width: 200
+          }
+        }
+      ]
+    },
+    installBarCdoe() {
+      return [
+        {
+          columnAttributes: {
+            label: '产品类型',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '急性条码',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '条码类型',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '状态',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '采集来源',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '采集时间',
+            prop: 'barCode',
+            width: 200
+          }
+        }
+      ]
+    },
+    formInstall() {
+      return [
+        {
+          columnAttributes: {
+            label: '产品类型',
+            prop: 'specification',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '机型条码',
+            prop: 'barCode',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '条码类型',
+            prop: 'materialType',
+            width: 200
+          }
+        },
+        {
+          columnAttributes: {
+            label: '状态',
+            prop: 'orderState',
+            width: 200
+          },
+          render: (h, { row }) => {
+            const { orderState } = row
+            return <div>{orderState[orderState]}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '采集来源',
+            prop: 'verificationStatus',
+            width: 200
+          },
+          render: (h, { row }) => {
+            const { verificationStatus } = row
+            const typeObj = {
+              1: '广佛设备',
+              2: '非广佛设备'
+
+            }
+            return <div>{typeObj[verificationStatus]}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '采集时间',
+            prop: 'createTime',
+            width: 200
+          }
+        }
+      ]
     }
   },
   mounted() {
+    if (this.details && this.details.stockType == 2) {
+      this.tabsList = [{
+        label: '安装信息',
+        value: 4,
+        show: true,
+        fun: this.getInstalDetail
+      },
+      {
+        label: '安装条码',
+        value: 5,
+        show: true,
+        fun: this.getListInstallCodeV2
+      }]
+    }
     this.getOrderTrackList2()
   },
   methods: {
@@ -638,6 +908,30 @@ export default {
       }).then(res => {
         this.outboundData = res.data.records
       })
+    },
+    getListInstallCodeV2() {
+      getListInstallCodeV2({
+        pageNum: 1,
+        pageSize: -1
+      }).then(res => {
+        this.instalLList = res.data.records
+      })
+    },
+    getInstalDetail() {
+      getInstalDetail({ gongDanId: this.gongDanId }).then(res => {
+        this.installDetail = res.data || {}
+      })
+    },
+    copy() {
+      const clipboard = new Clipboard('.tag-read')
+      // clipboard.on('success', e => {
+      //   this.$successMsg('复制成功');
+      // })
+      clipboard.on('error', e => {
+        console.log('该浏览器不支持复制')
+        return false
+      })
+      this.$successMsg('复制成功')
     }
   }
 }

+ 3 - 4
src/views/barcode/barcodeImport.vue

@@ -3,7 +3,6 @@
     ref="pageRef"
     :get-list="getList"
     :export-list="exportList"
-    :options-evens-group="optionsEvensGroup"
     :column-parsing="columnParsing"
   >
     <Popu v-if="visible" />
@@ -15,7 +14,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
-import { getListCustomerCodeV2, exportListCustomerCodeV2, importListCustomerCodeV2, luBaoDownloadDownload } from '@/api/barcode'
+import { getListInstallCodeV2, exportInstallListCodeV2, importListCustomerCodeV2, luBaoDownloadDownload } from '@/api/barcode'
 export default {
   components: { TemplatePage, Popu },
   mixins: [import_mixin, add_callback_mixin],
@@ -69,10 +68,10 @@ export default {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getListCustomerCodeV2(...p)
+      return getListInstallCodeV2(...p)
     },
     // 列表导出函数
-    exportList: exportListCustomerCodeV2,
+    exportList: exportInstallListCodeV2,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData

+ 36 - 2
src/views/sales_control/sales_management/components/customer_sales_details.vue

@@ -16,7 +16,10 @@
         </el-button>
       </template>
     </sales-table>
-    <LogisticsTabs v-if="details && details.status !== 1 && details.stockType == 1 " :return-show="false" style="margin:20px;" :details-id="detailsId" :jiaxian-order-id="details.jiaxianOrderId"/>
+    <el-card style="margin: 0 20px">
+      <zj-table :is-drop="true" :columns="examineColumns" :table-data="examineData" />
+    </el-card>
+    <LogisticsTabs v-if="Object.keys(details).length && details.status !== 1 " :details="details" :return-show="false" style="margin:20px;" :gong-dan-id="details.gongDanId" :details-id="detailsId" :jiaxian-order-id="details.jiaxianOrderId" />
     <sales-dialog
       :dialog-visible="dialogVisible"
       :customer-number="customerNumber"
@@ -106,7 +109,38 @@ export default {
           timestamp: '2018-04-11'
         }
       ],
-      isFront: null
+      isFront: null,
+      examineData: []
+    }
+  },
+  computed: {
+    examineColumns() {
+      return [
+        {
+          columnAttributes: {
+            label: '审核信息',
+            prop: 'barCode'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '审核人',
+            prop: 'barCode'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '审核时间',
+            prop: 'barCode'
+          }
+        },
+        {
+          columnAttributes: {
+            label: '备注',
+            prop: 'barCode'
+          }
+        }
+      ]
     }
   },
   created() {

+ 1 - 1
src/views/sales_control/sales_management/components/return_sales_details.vue

@@ -43,7 +43,7 @@
         </el-popconfirm>
       </template>
     </sales-table>
-    <LogisticsTabs v-if=" details && details.status !== 1 && details.stockType == 1" style="margin:20px;" :jiaxian-order-id="details.jiaxianOrderId"  :details-id="detailsId" :return-show="false" />
+    <LogisticsTabs v-if=" Object.keys(details).length && details.status !== 1 && details.stockType == 1" style="margin:20px;" :gong-dan-id="details.gongDanId" :details="details" :jiaxian-order-id="details.jiaxianOrderId"  :details-id="detailsId" :return-show="false" />
 
     <sales-dialog
       ref="dia"