lilei пре 3 дана
родитељ
комит
84b0034d48

+ 4 - 2
src/views/productManagement/productInfo/importGuideModal.vue

@@ -16,7 +16,7 @@
           </div>
           <ul>
             <li>1) 请先下载导入模板,模板中已标示出必填项</li>
-            <li>2) 产品编码具有唯一性,{{ guideType=='1'?'系统中已存在的无法导入':'下线导入,必须是系统中已存在的产品编码' }}</li>
+            <li>2) 产品编码具有唯一性,{{ guideType=='1'?'系统中已存在的无法导入':(guideType=='2'?'下线导入':'上线导入')+',必须是系统中已存在的产品编码' }}</li>
             <li v-if="guideType=='1'">3) 产品品牌、产品分类、单位、包装数单位、出库仓库、退货仓库,必须是系统中已经存在的值,否则无法导入</li>
             <li v-if="guideType=='2'"><a :href="filePath" style="margin: 5px 0 0 15px;display: block;">
               <a-icon type="download" style="padding-right: 5px;" />下载导入模板
@@ -70,6 +70,7 @@
     <!-- 导入 -->
     <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
     <offlineImportModal :openModal="openOfflineImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+    <onlineImportModal :openModal="openOfflineImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
   </a-modal>
 </template>
 
@@ -78,11 +79,12 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import ChooseImportModal from './chooseImportModal.vue'
 import offlineImportModal from './offlineImportModal.vue'
+import onlineImportModal from './onlineImportModal.vue'
 import { Upload } from '@/components'
 export default {
   name: 'SalesImportGuideModal',
   mixins: [commonMixin],
-  components: { ChooseImportModal, offlineImportModal, Upload },
+  components: { ChooseImportModal, offlineImportModal, onlineImportModal, Upload },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,

+ 1 - 0
src/views/productManagement/productInfo/list.vue

@@ -103,6 +103,7 @@
         <div class="table-operator">
           <a-button type="primary" id="productInfoList-add" v-if="$hasPermissions('B_productInfo_add')" @click="handleEdit()">新增</a-button>
           <a-button type="primary" id="productInfoList-addProduct" class="button-info" @click="handleMenuClick({key:'1'})" v-if="$hasPermissions('B_productInfo_batchImport')"> 新增产品导入</a-button>
+          <a-button type="primary" id="productInfoList-unline-import" class="button-info" @click="handleMenuClick({key:'3'})" v-if="$hasPermissions('B_offlineProduct_import')"> 上线产品导入</a-button>
           <a-button type="primary" id="productInfoList-import" class="button-info" @click="handleMenuClick({key:'2'})" v-if="$hasPermissions('B_offlineProduct_import')"> 下线产品导入</a-button>
           <a-button
             id="productInfoList-batchAudit"

+ 229 - 0
src/views/productManagement/productInfo/onlineImportModal.vue

@@ -0,0 +1,229 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条,确认要批量上线吗?</p>
+      <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="sTable"
+        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 { batchImportProduct, exportErrorProduct } from '@/api/product'
+export default {
+  name: 'SalesOnlineImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {// 导入数据
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', dataIndex: 'packQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品尺寸', dataIndex: 'size', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量(g)', dataIndex: 'weight', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '颜色', dataIndex: 'color', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库仓库', dataIndex: 'outWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      loadData: [], // 可导入数据
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '其它编码', dataIndex: 'otherCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '一级分类', dataIndex: 'productTypeName1', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级分类', dataIndex: 'productTypeName2', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '三级分类', dataIndex: 'productTypeName3', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', dataIndex: 'packQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数单位', dataIndex: 'packQtyUnit', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否箭冠产品', dataIndex: 'arrow', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '条形码', dataIndex: 'qrCode', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品尺寸', dataIndex: 'size', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品重量(g)', dataIndex: 'weight', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '颜色', dataIndex: 'color', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库仓库', dataIndex: 'outWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'errorMsg', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      unLoadData: [], // 导入错误数据
+      loading: false// 列表加载状态
+    }
+  },
+  methods: {
+    // 获取导入列表数据
+    getData () {
+      const _this = this
+      this.loading = true
+      const params = {
+        path: this.paramsData.path
+      }
+      batchImportProduct(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(exportErrorProduct, _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>

+ 12 - 2
src/views/salesManagement/salesQueryNew/printModal.vue

@@ -71,6 +71,13 @@
             <a-radio :value="0">不导出</a-radio>
           </a-radio-group>
         </a-form-model-item>
+        <!-- 原厂编码 -->
+        <a-form-model-item label="原厂编码" prop="origCode" v-if="nowType=='export'">
+          <a-radio-group v-model="form.origCode">
+            <a-radio :value="1">导出</a-radio>
+            <a-radio :value="0">不导出</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button id="sales-print-back" @click="cancel">取消</a-button>
@@ -109,7 +116,8 @@ export default {
         dataScope: 'all',
         priceType: undefined,
         orderBy: undefined,
-        averagePrice: undefined
+        averagePrice: undefined,
+        origCode: undefined
       },
       // 选项校验
       rules: {
@@ -117,7 +125,8 @@ export default {
         dataScope: [{ required: true, message: '请选择是否缺货产品', trigger: 'change' }],
         priceType: [{ required: true, message: '请选择产品售价', trigger: 'change' }],
         orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }],
-        averagePrice: [{ required: true, message: '请选择平均公斤单价', trigger: 'change' }]
+        averagePrice: [{ required: true, message: '请选择平均公斤单价', trigger: 'change' }],
+        origCode: [{ required: true, message: '请选择原厂编码', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -200,6 +209,7 @@ export default {
               salesBillSn: _this.itemData.salesBillSn,
               priceType: _this.form.priceType,
               dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope,
+              origCode: _this.form.origCode,
               type: isPrint || 'preview'
             }
             _this.$emit('ok', obj)

+ 2 - 2
src/views/setting/removeSetting/index.vue

@@ -8,9 +8,9 @@
         <a-tab-pane key="2" tab="每日报表剔除" force-render>
           <list2></list2>
         </a-tab-pane>
-        <!-- <a-tab-pane key="3" tab="轮胎补贴剔除" force-render>
+        <a-tab-pane key="3" tab="轮胎补贴剔除" force-render>
           <list3></list3>
-        </a-tab-pane> -->
+        </a-tab-pane>
       </a-tabs>
     </a-card>
   </div>