ソースを参照

Merge branch 'develop_yh17_fencang' of jianguan-web/jg-ocs-html into develop_yh18

刘俊俊 2 年 前
コミット
3b23ab5c80

BIN
public/templ/销售导入产品模板.xlsx


+ 1 - 1
src/config/router.config.js

@@ -187,7 +187,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'waitDispatch/:salesBillSn/:dispatchBillSn',
+                path: 'waitDispatch/:salesBillSn',
                 name: 'waitDispatch',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/waitDispatch/edit.vue'),
                 meta: {

+ 11 - 8
src/views/salesManagement/salesQuery/detail.vue

@@ -411,11 +411,11 @@ export default {
       salesWriteAuditPush(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.spinningAudit = false
-          this.spinning = false
           //  关闭详情跳列表
           this.handleBack()
         }
+        this.spinningAudit = false
+        this.spinning = false
       })
     },
     // 审核
@@ -429,12 +429,15 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.spinningAudit = false
-          if (billStatus == 'AUDIT_PASS' && !this.auditText) {
-            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.bizSn || this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } })
-          } else {
-            //  关闭详情跳列表
-            this.handleBack()
-          }
+          const _this = this
+          this.$nextTick(() => {
+            if (billStatus == 'AUDIT_PASS' && !_this.auditText) {
+              _this.$router.push({ name: 'waitDispatch', params: { salesBillSn: _this.bizSn || _this.$route.params.sn } })
+            } else {
+              //  关闭详情跳列表
+              _this.handleBack()
+            }
+          })
         } else {
           this.visibleAudit = false
           this.spinningAudit = false

+ 16 - 11
src/views/salesManagement/salesQuery/edit.vue

@@ -589,18 +589,23 @@ export default {
     },
     // 提交销售单
     handleSubmit () {
-      // 先不提交,先判断是否有价格更新
-      submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
-        if (res.status == 200) {
-          if (res.data.length > 0) {
-            this.updataData = res.data
-            this.priceUpdateModal = true
-          } else {
-            const ajax_data = { salesBillSn: this.salesBillSn }
-            this.submitResult(ajax_data)
+      // 先不提交,先判断是否有价格更新  (下级创建时判断)
+      if (this.detailData && this.detailData.salesBillSource && this.detailData.salesBillSource == 'PURCHASE') {
+        submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
+          if (res.status == 200) {
+            if (res.data.length > 0) {
+              this.updataData = res.data
+              this.priceUpdateModal = true
+            } else {
+              const ajax_data = { salesBillSn: this.salesBillSn }
+              this.submitResult(ajax_data)
+            }
           }
-        }
-      })
+        })
+      } else {
+        const ajax_data = { salesBillSn: this.salesBillSn }
+        this.submitResult(ajax_data)
+      }
     },
     // 提交
     submitResult (data) {

+ 21 - 15
src/views/salesManagement/salesQuery/importGuideModal.vue

@@ -18,8 +18,13 @@
             <li>1) 导入的Excel文件中必须包含名为“产品编码”、“数量”的列,且名称必须相同</li>
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
+          <!-- <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button> -->
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -91,7 +96,8 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false,
+      filePath: location.protocol + '//' + location.host + '/templ/销售导入产品模板.xlsx'
     }
   },
   methods: {
@@ -123,20 +129,20 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      const params = { grabFlag: this.params.grabFlag }
-      this.exportLoading = true
-      this.spinning = true
-      setTimeout(() => {
-        _this.exportLoading = false
-      }, 1000)
-      hdExportExcel(salesDownload, params, '销售导入模板', function () {
-        _this.spinning = false
-      })
     }
+    //  导出
+    // handleExport () {
+    //   const _this = this
+    //   const params = { grabFlag: this.params.grabFlag }
+    //   this.exportLoading = true
+    //   this.spinning = true
+    //   setTimeout(() => {
+    //     _this.exportLoading = false
+    //   }, 1000)
+    //   hdExportExcel(salesDownload, params, '销售导入模板', function () {
+    //     _this.spinning = false
+    //   })
+    // }
   },
   watch: {
     //  父页面传过来的弹框状态

+ 17 - 4
src/views/salesManagement/salesQuery/list.vue

@@ -162,9 +162,16 @@
         </template>
         <!-- 出库仓库 -->
         <template slot="warehouseBox" slot-scope="text, record">
-          <div class="warehouse_box" v-if="record.warehouseNameSet && record.warehouseNameSet.length>0">
-            <span v-for="(item,i) in record.warehouseNameSet" :key="i">{{ item }}</span>
-          </div>
+          <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>
+            </template>
+            <div class="warehouse_box">
+              <span v-for="(item,i) in record.warehouseNameSet" :key="i">{{ item }}</span>
+            </div>
+          </a-tooltip>
           <div v-else>--</div>
         </template>
         <!-- 总数量 -->
@@ -446,7 +453,7 @@ export default {
       findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
         this.spinning = false
         if (res.status == 200) {
-          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn, dispatchBillSn: res.data.dispatchBillSn } })
+          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn } })
         }
       })
     },
@@ -611,6 +618,12 @@ export default {
           font-size: 13px;
         }
       }
+      .warehouse_box{
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
       .warehouse_box>span::after{
         content:','
       }

+ 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">
-              以订单当前价格为准
+              以订单当前价格为准,总金额:100元
             </a-radio>
             <a-radio value="1" :style="radioStyle">
-              以OCS最新价格为准
+              以OCS最新价格为准,总金额:100元
             </a-radio>
           </a-radio-group>
         </div>

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

@@ -144,9 +144,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        this.productForm.dispatchBillSn = this.$route.params.dispatchBillSn
         // 查询统计
-        this.getTotalData()
         return waitDispatchDetailAllList(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -176,6 +174,11 @@ 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()
+          })
         } else {
           this.totalData = null
         }
@@ -195,7 +198,7 @@ export default {
             _this.$refs.partQuery.resetCurForm()
             _this.$message.success(res.message)
             _this.spinning = false
-            _this.resetSearchForm(true)
+            _this.resetSearchForm()
           } else {
             _this.spinning = false
           }
@@ -205,8 +208,8 @@ export default {
       }
     },
     //  重置
-    resetSearchForm (flag) {
-      this.$refs.table.refresh(!!flag)
+    resetSearchForm () {
+      this.getTotalData()
       this.getOrderDetail()
     },
     //  返回
@@ -256,7 +259,7 @@ export default {
       _this.spinning = true
       deleteBatch(type == 0 ? [row.dispatchBillDetailSn] : row).then(res => {
         if (res.status == 200) {
-          _this.resetSearchForm(true)
+          _this.resetSearchForm()
           _this.$refs.partQuery.resetCurForm()
           if (type == 1) { //  批量操作
             _this.$refs.table.clearSelected() // 清空表格选中项
@@ -372,7 +375,7 @@ export default {
       this.$refs.partQuery.clearTable()
       this.salesBillSn = this.$route.params.salesBillSn
       this.getOrderDetail()
-      this.$refs.table.refresh(true)
+      this.getTotalData()
     }
   },
   mounted () {

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

@@ -45,7 +45,7 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="出库仓库">
-              <chooseWarehouse ref="warehouse" :allowClear="false" v-model="queryParam.warehouseSn"></chooseWarehouse>
+              <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">