瀏覽代碼

Merge branch 'develop_yh18' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh18

chenrui 2 年之前
父節點
當前提交
91402873b4

二進制
public/templ/销售导入产品模板.xlsx


+ 2 - 0
src/views/salesManagement/salesQuery/chooseImportModal.vue

@@ -91,6 +91,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'qtyText', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存', dataIndex: 'stockQty', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
@@ -100,6 +101,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '21%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '数量', dataIndex: 'qtyText', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存', dataIndex: 'stockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },

+ 2 - 2
src/views/salesManagement/salesQuery/importGuideModal.vue

@@ -15,8 +15,8 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”的列,且名称必须相同</li>
-            <li>2) 除了“产品编码”、“数量”列,其他列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”、“出库仓库”的列,且名称必须相同</li>
+            <li>2) 除了“产品编码”、“数量”、“出库仓库”三列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
             <li>
               <a :href="filePath" style="margin: 5px 0 0;display: block;">

+ 8 - 10
src/views/salesManagement/salesQuery/list.vue

@@ -164,12 +164,10 @@
         <template slot="warehouseBox" slot-scope="text, record">
           <a-tooltip placement="right" v-if="record.warehouseNameSet && record.warehouseNameSet.length>0">
             <template slot="title">
-              <div class="warehouse_box1">
-                <span v-for="(item,i) in record.warehouseNameSet" :key="i">{{ item }},</span>
-              </div>
+              <span>{{ record.warehouseNameSet.toString() }}</span>
             </template>
             <div class="warehouse_box">
-              <span v-for="(item,i) in record.warehouseNameSet" :key="i">{{ item }}</span>
+              <span>{{ record.warehouseNameSet.toString() }}</span>
             </div>
           </a-tooltip>
           <div v-else>--</div>
@@ -624,12 +622,12 @@ export default {
         white-space: nowrap;
         text-overflow: ellipsis;
       }
-      .warehouse_box>span::after{
-        content:','
-      }
-      .warehouse_box>span:last-child::after{
-        content:''
-      }
+      // .warehouse_box>span::after{
+      //   content:',';
+      // }
+      // .warehouse_box>span:last-child::after{
+      //   content:'';
+      // }
     }
   }
 </style>

+ 2 - 2
src/views/salesManagement/salesQuery/setPriceModal.vue

@@ -16,10 +16,10 @@
           <div style="margin-bottom:10px;font-weight:bold;">销售单部分产品价格发生变更,请确认</div>
           <a-radio-group v-model="priceVal">
             <a-radio value="0" :style="radioStyle">
-              以订单当前价格为准,总金额:{{ totalRealAmount }}元
+              以【当前】价格为准,总金额:{{ totalRealAmount }}元
             </a-radio>
             <a-radio value="1" :style="radioStyle">
-              以OCS最新价格为准,总金额:{{ totalAmount }}元
+              以【最新】价格为准,总金额:{{ totalAmount }}元
             </a-radio>
           </a-radio-group>
         </div>

+ 13 - 7
src/views/salesManagement/waitDispatch/edit.vue

@@ -113,6 +113,7 @@ import { salesDetailBySn } from '@/api/sales'
 import { salesDetailDispatchByOneKey, insertBatchOfWaitDispatch, salesDetailUpdateCancelQty } from '@/api/salesDetail'
 import { deleteBatch, pushDown, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
 import { findBySalesBillSn } from '@/api/dispatch'
+import { keys } from 'core-js/fn/array'
 export default {
   name: 'WaitDispatch',
   mixins: [commonMixin],
@@ -136,7 +137,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '26%', align: 'center' },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '29%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'dispatchBill.warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '待下推数量', dataIndex: 'surplusQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: '11%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -175,11 +176,16 @@ export default {
       findBySalesBillSn({ salesBillSn: this.$route.params.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.totalData = res.data || null
-          this.productForm.dispatchBillSn = res.data.dispatchBillSn
-          const _this = this
-          this.$nextTick(() => {
-            _this.$refs.table.refresh()
-          })
+          if (res.data && Object.keys(res.data).length > 0) {
+            this.productForm.dispatchBillSn = res.data.dispatchBillSn
+            const _this = this
+            this.$nextTick(() => {
+              _this.$refs.table.refresh()
+            })
+          }else{
+            this.dataSource = []
+             this.$refs.table.clearTable()
+          }
         } else {
           this.totalData = null
         }
@@ -372,7 +378,7 @@ export default {
     },
     pageInit () {
       this.rowSelectionInfo = null
-      this.$refs.table.clearTable()
+      // this.$refs.table.clearTable()
       this.$refs.partQuery.clearTable()
       this.salesBillSn = this.$route.params.salesBillSn
       this.getOrderDetail()

+ 1 - 1
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -214,7 +214,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '出库仓库', dataIndex: 'dispatchBill.warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '可用库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 13 - 10
src/views/salesReturnManagement/salesReturn/chooseCustomModal.vue

@@ -75,6 +75,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
 import warehouse from '@/views/common/chooseWarehouse.js'
 import { dealerSubareaScopeList, dealerDetailBySn } from '@/api/dealer'
 import { getDefaultWarehouse } from '@/api/warehouse'
@@ -87,6 +88,8 @@ export default {
     show: [Boolean]
   },
   data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
     return {
       opened: this.show,
       spinning: false,
@@ -122,18 +125,18 @@ export default {
     }
   },
   methods: {
-    // 搜索经销商
-    fetchUser (value) {
-      console.log('fetching user', value)
+    fetchUser (dealerName) {
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = []
       this.fetching = true
-      dealerSubareaScopeList({ nameLike: value.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
-        if (res.status == 200) {
-          this.dealerData = res.data && res.data.list ? res.data.list : []
-          this.fetching = false
-        } else {
-          this.dealerData = []
-          this.fetching = false
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
         }
+        this.dealerData = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
       })
     },
     // 客户  change