ソースを参照

产品追溯列表

chenrui 1 年間 前
コミット
ff3e095bb8

+ 0 - 11
src/config/router.config.js

@@ -431,17 +431,6 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_outboundOrderList'
                 }
-              },
-              {
-                path: 'uniqueCode',
-                name: 'uniqueCodeList',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/uniqueCodeList.vue'),
-                meta: {
-                  title: '轮胎唯一码',
-                  icon: 'export',
-                  hidden: true
-                  // permission: 'M_uniqueCodeList'
-                }
               }
             ]
           },

+ 204 - 0
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -0,0 +1,204 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="900">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <a-row :gutter="16">
+        <a-col :span="5">
+          <p class="">可导入数据{{ loadData.length }}条</p>
+        </a-col>
+        <a-col :span="19">
+          <a-tooltip placement="topLeft">
+            <template slot="title">
+              <div>产品款数与产品数量不符:Y6508N(17/18);Y6509N(15/18)</div>
+            </template>
+            <div>
+              产品款数与产品数量不符:Y6508N(17/18);Y6509N(15/18)
+            </div>
+          </a-tooltip></a-col>
+      </a-row>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length==0?'button-grey':'button-primary'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { productPriceImport, productPriceFailExcel } from '@/api/product'
+export default {
+  name: 'ChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '唯一码', dataIndex: 'warehouseName', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'warehouseName1', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '工厂出库单号', dataIndex: 'warehouseLocationName', width: '26%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      loadData: [],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '唯一码', dataIndex: 'warehouseName', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'warehouseName1', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '工厂出库单号', dataIndex: 'warehouseLocationName', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'errorMsg', width: '27%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const _this = this
+      this.loading = true
+      const params = {
+        path: this.paramsData.path
+      }
+      productPriceImport(params).then(res => {
+        this.loading = false
+        if (res.status == 200) {
+          if (res.data.rightList && res.data.rightList.length > 0) {
+            res.data.rightList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          if (res.data.errorList && res.data.errorList.length > 0) {
+            res.data.errorList.map((item, index) => {
+              item.no = index + 1
+            })
+          }
+          _this.loadData = res.data.rightList || []
+          _this.unLoadData = res.data.errorList || []
+        }
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('无可导入轮胎唯一码!')
+      } else {
+        this.$emit('ok', this.loadData)
+        this.isShow = false
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出的错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(productPriceFailExcel, _this.unLoadData, '轮胎唯一码错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 5 - 5
src/views/salesManagement/outboundOrder/importGuideModal.vue → src/views/productManagement/productSourcePath/importGuideModal.vue

@@ -16,10 +16,10 @@
           </div>
           <ul>
             <li>1) 请先下载导入模板,模板中已标示出必填项</li>
-            <li>2) “产品编码”该出库单中存在的产品编码</li>
+            <li>2) “产品编码”该业务单中存在的产品编码</li>
             <li>3) “唯一码”具有唯一性,必填,需输入正确唯一码,不能为空,不可重复</li>
-            <li>4) “工厂出库单号”非必填,可重复,可为空</li>
-            <li>5) 一次需要全部导完,多次导入则会覆盖上一次导入数据</li>
+            <li>4) 业务单号需是系统中已审核通过的销售单和调拨单</li>
+            <li>5) “工厂出库单号”非必填,可重复,可为空</li>
             <li>
               <a :href="filePath" style="margin: 5px 0 0;display: block;">
                 <a-icon type="download" style="padding-right: 5px;" />下载导入模板
@@ -70,11 +70,11 @@
 </template>
 
 <script>
-// import ChooseImportModal from './chooseImportModal.vue'
+import ChooseImportModal from './chooseImportModal.vue'
 import { Upload } from '@/components'
 export default {
   name: 'ImportGuideModal',
-  components: { Upload },
+  components: { Upload,ChooseImportModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,

+ 30 - 39
src/views/productManagement/productSourcePath/list.vue

@@ -13,7 +13,7 @@
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="出库时间" prop="time">
+              <a-form-model-item label="审核时间" prop="time">
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
@@ -97,20 +97,17 @@
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 统计 -->
-        <a-row :gutter="15">
-          <a-col :md="20" :sm="24">
-            <div class="tongji-bar" style="margin-bottom:10px">
-              产品总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
-              产品总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
-            </div>
-          </a-col>
-          <a-col :md="4" :sm="24" style="text-align:right;">
-            <a-checkbox @change="onTiresChange">
-              <span style="margin-right:5px;">已退货轮胎</span>
-              <a-tooltip placement="top" title="置灰列表轮胎为已退货轮胎"><a-icon type="question-circle"/></a-tooltip>
-            </a-checkbox>
-          </a-col>
-        </a-row>
+        <div style="display:flex;align-items:center;margin-bottom:10px;">
+          <a-button
+            type="primary"
+            id="outboundOrder-export"
+            :loading="loading"
+            @click="openGuideModal = true">导入</a-button>
+          <div class="tongji-bar" style="margin-left:10px;">
+            产品总款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
+            产品总数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          </div>
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable fixPagination"
@@ -126,12 +123,12 @@
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button
+            <!-- <a-button
               size="small"
               type="link"
               class="button-warning"
               @click="openRecordModal = true"
-            >流转记录</a-button>
+            >流转记录</a-button> -->
             <a-button
               size="small"
               type="link"
@@ -145,6 +142,8 @@
       <warranty-info-modal v-drag :openModal="openInfoModal" @close="openInfoModal = false" />
       <!-- 流转记录 -->
       <roam-record-modal v-drag :openModal="openRecordModal" @close="openRecordModal = false" />
+      <!-- 导入轮胎唯一码 -->
+      <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
     </a-card>
   </div>
 </template>
@@ -159,12 +158,12 @@ import {
   VSelect
 } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import subarea from '@/views/common/subarea.js'
 import custList from '@/views/common/custList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import AreaList from '@/views/common/areaList.js'
 import warrantyInfoModal from './warrantyInfoModal.vue'
 import roamRecordModal from './roamRecordModal.vue'
+import importGuideModal from './importGuideModal.vue'
 import {
   hdExportExcel
 } from '@/libs/exportExcel'
@@ -184,14 +183,15 @@ export default {
     VSelect,
     rangeDate,
     custList,
-    subarea,
     reportModal,
     AreaList,
     warrantyInfoModal,
-    roamRecordModal
+    roamRecordModal,
+    importGuideModal
   },
   data () {
     return {
+      loading: false,
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
@@ -208,10 +208,6 @@ export default {
         dealerName: '',
         dealerLevel: undefined,
         operatorSn: undefined,
-        subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
         dealerProvinceSn: undefined
       },
       openInfoModal: false, // 质保信息弹窗
@@ -221,12 +217,12 @@ export default {
         { title: '产品编码', dataIndex: 'indirectDealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '唯一码', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务单号', dataIndex: 'salesBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库时间', dataIndex: 'giftQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'totalQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库时间', dataIndex: 'giftQty1', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'totalQty2', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '出库仓库', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '当前所在客户', dataIndex: 'giftQty', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '质保状态', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '当前所在客户', dataIndex: 'giftQty3', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '质保状态', dataIndex: 'giftQty4', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ],
       rules: {
@@ -260,7 +256,8 @@ export default {
       },
       totalData: null,
       operatorList: [], //  操作员下拉数据
-      addrProvinceList: [] //  省下拉
+      addrProvinceList: [], //  省下拉
+      openGuideModal: false
     }
   },
   watch: {
@@ -275,6 +272,9 @@ export default {
     }
   },
   methods: {
+    handleGuideOk (resData) {
+
+    },
     onTiresChange (e) {
       console.log(`checked = ${e.target.checked}`)
     },
@@ -316,10 +316,6 @@ export default {
     custChange (val) {
       this.queryParam.dealerSn = val.key
     },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
     //  重置
     resetSearchForm () {
       this.queryParam.time = [
@@ -333,13 +329,8 @@ export default {
       this.queryParam.dealerName = ''
       this.queryParam.dealerLevel = undefined
       this.queryParam.operatorSn = undefined
-      this.queryParam.subareaArea.subareaSn = undefined
-      this.queryParam.subareaArea.subareaAreaSn = undefined
       this.queryParam.dealerProvinceSn = undefined
       this.totalData = null
-      if (this.advanced) {
-        this.$refs.subarea.clearData()
-      }
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
@@ -387,7 +378,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 236
+      this.tableHeight = window.innerHeight - tableSearchH - 252
     }
   },
   mounted () {

+ 4 - 5
src/views/reportData/tireSalesReport/list.vue

@@ -105,7 +105,7 @@
         <div class="tongji-bar" style="margin-bottom:10px">
           总销售款数:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '0' }}</strong>;
           总销售数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
-          总售金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
+          总售金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
           已售出数量(从客户系统销售出库):<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
           已售出金额:<strong>{{ totalData&&(totalData.totalPushedAmount || totalData.totalPushedAmount==0) ? toThousands(totalData.totalPushedAmount) : '--' }}</strong>;
           未售出数量:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
@@ -240,14 +240,13 @@ export default {
         { title: '产品编码', dataIndex: 'indirectDealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'totalQty', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '唯一码', dataIndex: 'giftQty', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '售价(开单金额)', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库时间', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '客户出库日期', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '实售金额', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售审核时间', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '当前所在客户', dataIndex: 'giftQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '销售状态', dataIndex: 'giftQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
-        arr.splice(10, 0, { title: '售价(开单金额', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '售金额', dataIndex: 'totalRealSaleAmount', width: '12%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 0 - 239
src/views/salesManagement/outboundOrder/chooseImportModal.vue

@@ -1,239 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="chooseImport-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="确认导入"
-    v-model="isShow"
-    @cancel="isShow=false"
-    width="72%">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div class="chooseImport-con">
-        <p>产品款数与产品数量不符:Y6508N(17/18);Y6509N(15/18)</p>
-        <!-- 列表 -->
-        <s-table
-          class="sTable fixPagination"
-          ref="table"
-          style="height: 500px"
-          size="small"
-          :rowClassName="(record, index) => record.isError==1 ? 'redBg-row':''"
-          :rowKey="(record) => record.id"
-          :columns="columns"
-          :data="loadData"
-          :scroll="{ y:430}"
-          :defaultLoadData="false"
-          bordered>
-        </s-table>
-        <!-- 按钮 -->
-        <div class="btn-con">
-          <a-button
-            type="primary"
-            id="chooseImport-submit"
-            size="large"
-            class="button-primary"
-            @click="handleConfirm"
-            style="padding: 0 40px;">确认导入</a-button>
-          <a-button
-            id="chooseImport-cancel"
-            size="large"
-            class="button-cancel"
-            @click="handleCancel"
-            style="padding: 0 40px;margin-left: 15px;">取消</a-button>
-          <a-button
-            type="primary"
-            id="chooseImport-error"
-            size="large"
-            class="button-error"
-            @click="handleExportError"
-            style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
-        </div>
-      </div>
-      <common-modal
-        :openModal="openTipsModal"
-        :modalHtml="modalHtml"
-        modalTit="操作提示"
-        okText="确定"
-        :isCancel="false"
-        @ok="operationEnd"
-        @close="openTipsModal=false" />
-    </a-spin>
-  </a-modal>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { STable, Upload } from '@/components'
-import { stockImportList, stockImportFinish, stockImportCancel, stockImportKCExportError } from '@/api/stockImport'
-import { downloadExcel } from '@/libs/JGPrint.js'
-import commonModal from '@/views/common/commonModal.vue'
-export default {
-  name: 'StockImportList',
-  components: { STable, Upload, commonModal },
-  mixins: [commonMixin],
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    paramsData: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    }
-  },
-  data () {
-    return {
-      isShow: this.openModal, //  是否打开弹框
-      openTipsModal: false,
-      modalHtml: '',
-      spinning: false,
-      exportLoading: false, // 导出loading
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.spinning = true
-        return stockImportList(Object.assign(parameter, { stockImportSn: this.uploadData && this.uploadData.stockImportSn })).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            const ret = data.list.filter(item => item.isError == 1)
-            this.isAllError = ret.length == data.count
-            this.listData = data.list
-            if (this.uploadData && data.list.length == 0) {
-              this.$message.info('没有可导入数据,请检查模板是否为空')
-              this.resetSearchForm()
-            }
-          }
-          this.spinning = false
-          return data
-        })
-      },
-      isAllError: false, // 是否全部错误
-      listData: [],
-      columns:[
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '唯一码', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '工厂出库单号', dataIndex: 'warehouseLocationName', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '错误原因', dataIndex: 'errorMsg', width: '30%', align: 'center', customRender: function (text) { return text || '--' } }
-      ]
-    }
-  },
-  methods: {
-    resetSearchForm () {
-      this.$refs.table.clearTable() //  清空列表数据
-      this.uploadData = null //  清空上传数据
-    },
-    // 确认导入
-    handleConfirm () {
-      const _this = this
-      if (this.isAllError) {
-        this.$message.error('没有可导入的数据!')
-        return false
-      }
-      _this.spinning = true
-      stockImportFinish({ stockImportSn: _this.uploadData && _this.uploadData.stockImportSn }).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.showSuccessModal(res.data)
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-      })
-    },
-    showSuccessModal (data) {
-      if (data) {
-        this.openTipsModal = true
-        this.$emit('close')
-        this.modalHtml = `<div><div>库存导入成功</div><div>入库类型:库存导入</div><div>库存批次:${data.stockBatchNo}</div><div>总导入款数:${data.productTotalCategory}</div><div>总入库数量:${data.productTotalQty}</div><div>总入库成本:${data.productTotalCost}</div></div>`
-      }
-    },
-    // 操作完成
-    operationEnd () {
-      this.$emit('ok')
-      this.openTipsModal = false
-      this.isShow = false
-      this.resetSearchForm()
-    },
-    // 取消导入
-    handleCancel () {
-      const _this = this
-      _this.spinning = true
-      stockImportCancel({ stockImportSn: _this.uploadData && _this.uploadData.stockImportSn }).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.spinning = false
-          _this.isShow = false
-          _this.resetSearchForm()
-        } else {
-          _this.spinning = false
-        }
-      })
-    },
-    // 导出错误项
-    handleExportError () {
-      const _this = this
-      _this.spinning = true
-      stockImportKCExportError({ stockImportSn: _this.uploadData && _this.uploadData.stockImportSn }).then(res => {
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          downloadExcel(res, '库存导入错误项')
-        }
-      })
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-      } else {
-        if (this.paramsData) {
-          this.uploadData = this.paramsData
-          const _this = this
-          this.$nextTick(() => {
-            _this.$refs.table.refresh(true)
-          })
-        }
-      }
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-  .chooseImport-modal{
-    .chooseImport-con{
-      /deep/.redBg-row{
-        background-color: #F39494 !important;
-      }
-      .btn-con{
-        text-align: center;
-        margin: 30px 0 20px;
-        .button-cancel,.button-error{
-          font-size: 12px;
-        }
-      }
-    }
-  }
-</style>

+ 3 - 13
src/views/salesManagement/outboundOrder/list.vue

@@ -131,13 +131,6 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button
-              size="small"
-              type="link"
-              v-if="record.state=='WAIT'&&$hasPermissions('B_stockOut')"
-              class="button-primary"
-              @click="handleUniqueCode(record)"
-              id="outboundOrderList-out-btn">唯一码</a-button>
             <a-button
               size="small"
               type="link"
@@ -272,9 +265,9 @@ export default {
         { title: '发货状态', dataIndex: 'sendFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
-	  if (this.isShowWarehouse) {
-	    arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
-	  }
+      if (this.isShowWarehouse) {
+        arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      }
       if (this.$hasPermissions('M_outboundOrderList_salesPrice')) { //  售价权限
         arr.splice(this.isShowWarehouse ? 8 : 7, 0, { title: '售价', dataIndex: 'productTotalPrice', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
@@ -350,9 +343,6 @@ export default {
       this.orderSn = undefined
       this.openModal = false
     },
-    handleUniqueCode () {
-      this.$router.push({ name: 'uniqueCodeList' })
-    },
     // 出库/批量出库
     handleOutbound (row) {
       const _this = this

+ 0 - 250
src/views/salesManagement/outboundOrder/uniqueCodeList.vue

@@ -1,250 +0,0 @@
-<template>
-  <div>
-    <a-card size="small" :bordered="false" class="searchBoxNormal">
-      <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
-        <template slot="subTitle">
-          <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;font-weight: bold;">出库单号:{{ detailData&&detailData.salesBillNo }}</span>
-          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName }}</span>
-          <a-button size="small" type="link" class="button-default" @click="showDetail=!showDetail">
-            <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
-          </a-button>
-        </template>
-      </a-page-header>
-    </a-card>
-    <!-- 基础信息 -->
-    <div ref="detailInfo" style="margin-bottom: 6px;" v-if="showDetail">
-    <a-card size="small" :bordered="false" class="pages-wrap" >
-      <div style="padding: 0;">
-        <a-descriptions size="small" :column="3">
-          <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="销售单号">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="备货单号">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货客户名称">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="发货编号">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货人">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货电话">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货地址">{{ shippingAddress||'--' }}</a-descriptions-item>
-          <a-descriptions-item label="业务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-        </a-descriptions>
-      </div>
-    </a-card>
-    </div>
-    <a-card size="small" :bordered="false">
-      <a-spin :spinning="spinning" tip="Loading...">
-        <!-- 搜索条件 -->
-        <div ref="tableSearch" class="table-page-search-wrapper">
-          <a-form layout="inline">
-            <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="产品编码">
-                  <a-input v-model.trim="queryParam.outBizSubNo" allowClear placeholder="请输入产品编码"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="唯一码">
-                  <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入唯一码"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="产品名称">
-                  <a-input v-model.trim="queryParam.demanderName" allowClear placeholder="请输入产品名称"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <span class="table-page-search-submitButtons">
-                  <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
-                  <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-                </span>
-              </a-col>
-            </a-row>
-          </a-form>
-          <div style="margin-bottom:10px;">
-            <a-button
-              type="primary"
-              id="outboundOrder-export"
-              :loading="loading"
-              @click="openGuideModal = true">导入</a-button>
-            <span style="margin-left:6px;color:#f30;">每次都需全部导完,请在导入列表中修改后重新全部导入。</span>
-          </div>
-        </div>
-        <a-alert type="info" style="margin-bottom: 10px;" v-if="detailData!=null">
-          <div slot="message">
-            <span v-if="$route.params.type!='stockOut'">
-              轮胎款数:<strong>{{ detailData&&(detailData.totalSalesQty || detailData.totalSalesQty==0) ? detailData.totalSalesQty : '--' }}</strong>;
-            </span>
-            轮胎总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
-          </div>
-        </a-alert>
-        <!-- 表格数据 -->
-        <s-table
-          class="sTable fixPagination"
-          ref="table"
-          :style="{ height: tableHeight+70+'px' }"
-          size="small"
-          :rowKey="(record) => record.id"
-          :columns="columns"
-          :data="loadData"
-          :pageSize="30"
-          :scroll="{ y: tableHeight }"
-          bordered>
-        </s-table>
-      </a-spin>
-    </a-card>
-    <!-- 导入轮胎唯一码 -->
-    <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
-  </div>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { STable } from '@/components'
-import { stockOutList } from '@/api/stockOut'
-import importGuideModal from './importGuideModal.vue'
-export default {
-  name: 'UniqueCodeList',
-  mixins: [commonMixin],
-  components: { STable, importGuideModal },
-  data () {
-    return {
-      disabled: false,
-      spinning: false,
-      handlePlData: [],
-      queryParam: {
-        outBizSubNo: '',
-        demanderName: '',
-        receiverSn: undefined,
-        warehouseSn: undefined,
-        outBizTypeList: ['SALES', 'ALLOCATE']
-      },
-      loading:false,
-      orginData: [],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        return stockOutList(Object.assign(parameter, this.queryParam)).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            this.disabled = false
-          }
-          this.spinning = false
-          this.orginData = data.list
-          return data
-        })
-      },
-      snList: [],
-      openGuideModal: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'stockOutNo', width: '25%', align: 'center' },
-        { title: '唯一码', dataIndex: 'outBizSubNo', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'demanderName', width: '50%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true }
-      ],
-      detailData: null,
-      tableHeight: 0,
-      isHasId: true,
-      showDetail:false
-    }
-  },
-  watch: {
-    showDetail (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
-    }
-  },
-  methods: {
-    //  返回
-    handleBack () {
-      this.$router.push({ name: 'outboundOrder' })
-    },
-    handleGuideOk () {
-
-    },
-    custChange (val) {
-      this.queryParam.receiverSn = val.key || ''
-    },
-    // 删除
-    handleDel (row) {
-      const i = this.chooseData.findIndex(item => row.stockOutSn == item.stockOutSn)
-      this.chooseData.splice(i, 1)
-      const oi = this.orginData.findIndex(item => row.stockOutSn == item.stockOutSn)
-      if (oi >= 0) {
-        this.orginData[oi].checked = false
-      }
-    },
-    // 选择
-    handleChoose (row) {
-      row.checked = true
-      this.chooseData.push(row)
-      this.$emit('choose')
-    },
-    // 取消
-    handleCommonCancel () {
-      this.$emit('cancel')
-    },
-    // 重置
-    resetSearchForm () {
-      this.queryParam = {
-        outBizSubNo: '',
-        demanderName: '',
-        receiverSn: undefined,
-        warehouseSn: undefined,
-        outBizTypeList: ['SALES', 'ALLOCATE']
-      }
-      this.orginData = []
-      if (this.$refs.table) {
-        this.$refs.table.refresh(true)
-      }
-    },
-    pageInit () {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      const detailInfoH = this.showDetail? this.$refs.detailInfo.offsetHeight : 0
-      this.tableHeight = window.innerHeight - tableSearchH  - detailInfoH -255
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
-  }
-}
-</script>
-
-<style lang="less">
-
-</style>