Forráskód Böngészése

Merge branch 'develop_yh22' of jianguan-web/qpls-md-html into pre-release

李磊 2 éve
szülő
commit
da9a98f4be
30 módosított fájl, 746 hozzáadás és 163 törlés
  1. BIN
      public/templ/采购退货申请单产品明细模板.xlsx
  2. BIN
      public/templ/采购退货申请单(不良品)产品明细模板.xlsx
  3. BIN
      public/templ/采购退货申请单(良品)产品明细模板.xlsx
  4. 1 1
      public/version.json
  5. 9 0
      src/api/allocLinkageOut.js
  6. 4 3
      src/api/purchaseReturnApply.js
  7. 36 0
      src/api/reportData.js
  8. 1 1
      src/api/sales.js
  9. 25 0
      src/config/router.config.js
  10. 5 6
      src/store/modules/app.js
  11. 7 1
      src/views/Home.vue
  12. 41 7
      src/views/allocationManagement/chainTransferOut/list.vue
  13. 5 1
      src/views/common/custList.vue
  14. 38 39
      src/views/common/returnReason.js
  15. 14 22
      src/views/purchasingManagement/purchaseOrder/edit.vue
  16. 5 4
      src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue
  17. 3 1
      src/views/purchasingManagement/purchaseOrderNew/edit.vue
  18. 1 1
      src/views/purchasingManagement/purchaseOutOfStock/detailModal.vue
  19. 13 11
      src/views/purchasingManagement/purchaseReturnApplyForm/chooseImportModal.vue
  20. 5 3
      src/views/purchasingManagement/purchaseReturnApplyForm/detail.vue
  21. 85 34
      src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue
  22. 8 2
      src/views/purchasingManagement/purchaseReturnApplyForm/importGuideModal.vue
  23. 70 21
      src/views/purchasingManagement/purchaseReturnApplyForm/list.vue
  24. 132 0
      src/views/reportData/salesOutofStockReport/detailModal.vue
  25. 209 0
      src/views/reportData/salesOutofStockReport/list.vue
  26. 1 1
      src/views/salesManagement/salesQuery/detail.vue
  27. 1 1
      src/views/salesManagement/salesQuery/edit.vue
  28. 13 1
      src/views/salesManagement/salesQueryNew/detail.vue
  29. 13 1
      src/views/salesManagement/salesQueryNew/edit.vue
  30. 1 1
      vue.config.js

BIN
public/templ/采购退货申请单产品明细模板.xlsx


BIN
public/templ/采购退货申请单(不良品)产品明细模板.xlsx


BIN
public/templ/采购退货申请单(良品)产品明细模板.xlsx


+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1688522370731
+  "version": 1689646580070
 }

+ 9 - 0
src/api/allocLinkageOut.js

@@ -11,6 +11,15 @@ export const allocLinkageOutList = (params) => {
     method: 'post'
   })
 }
+// 导出
+export const allocLinkageOutExport = (params) => {
+  return axios({
+    url: '/allocLinkageOut/detail/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 // 连锁调拨调出  统计
 export const allocLinkageOutQueryCount = (params) => {
   return axios({

+ 4 - 3
src/api/purchaseReturnApply.js

@@ -78,9 +78,10 @@ export const purchaseReturnModifyQty = (params) => {
   })
 }
 // 申请单详情修改退货原因
-export const modifyReturnReason = (params) => {
+// 修改备注
+export const modifyReturnInfo = (params) => {
   return axios({
-    url: `/purchaseReturnApply/detail/modifyReturnReason`,
+    url: `/purchaseReturnApply/detail/modifyInfo`,
     data: params,
     method: 'post'
   })
@@ -88,7 +89,7 @@ export const modifyReturnReason = (params) => {
 // 批量修改退货原因
 export const modifyReturnReasonList = (params) => {
   return axios({
-    url: `/purchaseReturnApply/detail/modifyReturnReasonList`,
+    url: `/purchaseReturnApply/detail/modifyInfoList`,
     data: params,
     method: 'post'
   })

+ 36 - 0
src/api/reportData.js

@@ -931,3 +931,39 @@ export const purchaseReturnDetailExport = params => {
     responseType: 'blob'
   })
 }
+
+/*
+** 销售缺货报表
+*/
+
+// 销售缺货报表-列表
+export const salesOosQueryList = (params) => {
+  const url = `/salesOos/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 销售缺货报表-详情列表
+export const salesOosQueryDetailList = (params) => {
+  const url = `/salesOos/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 销售缺货报表-导出
+export const salesOosExport = params => {
+  return axios.request({
+    url: `/salesOos/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 1 - 1
src/api/sales.js

@@ -134,7 +134,7 @@ export const supperCodeByVin = (params) => {
 // 销售 详情  打印
 export const salesDetailPrint = params => {
   const data = {
-    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}/${params.remarksShowFlag}`,
+    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}/${params.printAllName}/${params.remarksShowFlag}/${params.priceFlag}`,
     method: 'get'
   }
   // 喷墨打印

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

@@ -2214,6 +2214,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/salesOutofStockReport',
+            redirect: '/reportData/salesOutofStockReport/list',
+            name: 'salesOutofStockReport',
+            component: BlankLayout,
+            meta: {
+              title: '销售缺货报表',
+              icon: 'profile',
+              permission: 'M_salesOutofStockReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesOutofStockReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesOutofStockReport/list.vue'),
+                meta: {
+                  title: '销售缺货报表',
+                  icon: 'profile',
+                  hidden: true,
+                  permission: 'M_salesOutofStockReportList'
+                }
+              }
+            ]
+          },
           {
             path: '/reportData/salesReturnReport',
             redirect: '/reportData/salesReturnReport/index',

+ 5 - 6
src/store/modules/app.js

@@ -48,7 +48,8 @@ const app = {
     printSettingType: '', // 设置打印机类型,0 针式,1 喷墨
     printDefNeedle: undefined,// 默认针式打印机
     printDefInk: undefined, // 默认喷墨打印机
-    returnReason: [], // 申请退货列表
+    defectiveReturnReason: [], // 不良品申请退货列表
+    goodReturnReason: [], // 良品申请退货列表
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -151,8 +152,8 @@ const app = {
     SET_printSettingType: (state, val) => {
       state.printSettingType = val
     },
-    SET_returnReason:(state, val) => {
-      state.returnReason = val
+    SET_returnReason:(state, obj) => {
+      state[obj.key] = obj.val
     },
   },
   actions: {
@@ -255,9 +256,7 @@ const app = {
         isEnable: params.isEnable
       }).then(res => {
         if (res.status == 200) {
-          commit('SET_returnReason', res.data.list)
-        }else{
-          commit('SET_returnReason', [])
+          commit('SET_returnReason', {key: params.key, val: res.data.list})
         }
       })
     },

+ 7 - 1
src/views/Home.vue

@@ -902,7 +902,13 @@ export default {
       }
       // 退货原因列表
       vm.getLookUpDataByCode({
-        code: 'RETURN_REASON',
+        code: 'GOOD_PRODUCT_RETURN',
+        key: 'goodReturnReason',
+        isEnable: 1
+      })
+      vm.getLookUpDataByCode({
+        code: 'DEFECTIVE_PRODUCT_RETURN',
+        key: 'defectiveReturnReason',
         isEnable: 1
       })
     })

+ 41 - 7
src/views/allocationManagement/chainTransferOut/list.vue

@@ -20,12 +20,12 @@
                 <rangeDate ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="连锁调出单号">
+                <a-input id="chainTransferOutList-allocationLinkageOutNo" v-model.trim="queryParam.allocationLinkageOutNo" allowClear placeholder="请输入连锁调出单号"/>
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="连锁调出单号">
-                  <a-input id="chainTransferOutList-allocationLinkageOutNo" v-model.trim="queryParam.allocationLinkageOutNo" allowClear placeholder="请输入连锁调出单号"/>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="调往对象">
                   <getTenantList id="chainTransferOutList-putTenantSn" type="out" placeholder="请选择调往对象" v-model="queryParam.putTenantSn"></getTenantList>
@@ -65,9 +65,17 @@
                 </a-form-item>
               </a-col>
             </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="chainTransferOutList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutList-reset">重置</a-button>
+              <a-button
+                type="primary"
+                class="button-warning"
+                v-if="$hasPermissions('B_allocLinkageOutExport')"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="chainTransferOutList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -166,7 +174,8 @@ import basicInfoModal from './basicInfoModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import getDate from '@/libs/getDate.js'
 import getTenantList from '@/views/common/getTenantList.js'
-import { allocLinkageOutList, allocLinkageAudit, allocLinkageOutDel, allocLinkageOutStock, allocLinkageOutQueryCount } from '@/api/allocLinkageOut'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { allocLinkageOutList, allocLinkageAudit, allocLinkageOutDel, allocLinkageOutStock, allocLinkageOutQueryCount, allocLinkageOutExport } from '@/api/allocLinkageOut'
 export default {
   name: 'AllocLinkageOutList',
   components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, getTenantList },
@@ -174,6 +183,7 @@ export default {
   data () {
     return {
       spinning: false,
+      exportLoading: false,
       tableHeight: 0,
       advanced: true, // 高级搜索 展开/关闭
       time: [
@@ -271,6 +281,30 @@ export default {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      _this.exportLoading = true
+      _this.spinning = true
+      allocLinkageOutExport(params).then(res => {
+        this.exportLoading = false
+        _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, '连锁调出列表')
+        }
+      })
+    },
     //  重置
     resetSearchForm () {
       this.resetData()

+ 5 - 1
src/views/common/custList.vue

@@ -58,6 +58,10 @@ export default {
     dealerDisabled: {
       type: Boolean,
       default: false
+    },
+    isDealerFlag: { // 是否为下级
+      type: Boolean,
+      default: false
     }
   },
   data () {
@@ -76,7 +80,7 @@ export default {
       const fetchId = this.lastFetchId
       this.data = []
       this.fetching = true
-      const params = { pageNo: 1, pageSize: 20, mainFlag: this.mainFlag ? 1 : 0 }
+      const params = { pageNo: 1, pageSize: 20, mainFlag: this.mainFlag ? 1 : 0, dealerFlag: this.isDealerFlag ? 1 : 0 }
       if (this.satelliteFlag) {
         params.satelliteFlag = 1
       }

+ 38 - 39
src/views/common/returnReason.js

@@ -1,31 +1,26 @@
 const ReturnReason = {
   template: `
-        <a-select
-            allowClear
-            :size="size"
-            mode="combobox"
-            :value="defaultVal"
-            show-search
-            :placeholder="placeholder"
-            option-filter-prop="children"
-            style="width: 100%"
-            :filter-option="filterOption"
-            :dropdownMatchSelectWidth="false"
-            @change="onChange"
-            @blur="onBlur"
-            @focus="open=true"
-            @select="open=false"
-            :open="open"
-          >
-            <a-select-option v-for="item in list" :key="item.code" :value="item.dispName">
-              {{item.dispName}}
-            </a-select-option>
-          </a-select>
+      <a-select
+        :placeholder="placeholder"
+        style="width:100%"
+        :size="size"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        @change="handleChange"
+        option-filter-prop="children"
+        :dropdownMatchSelectWidth="false"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.code" :value="item.code">
+          {{item.dispName}}
+        </a-select-option>
+      </a-select>
     `,
   props: {
     value: {
       type: String,
-      default: ''
+      default: undefined
     },
     id: {
       type: String,
@@ -33,27 +28,37 @@ const ReturnReason = {
     },
     placeholder: {
       type: String,
-      default: '请输入退货原因(最多50字符)'
+      default: '请选择退货原因'
     },
     size: {
       type: String,
       default: 'small'
+    },
+    goodFlag: {
+      type: String,
+      default: ''
     }
   },
   data() {
     return {
       defaultVal: this.value,
-      open: false,
       list: []
     };
   },
-  mounted() {
-    this.list = this.$store.state.app.returnReason
+  created() {
+    // 不良品
+    if(this.goodFlag == 'DEFECTIVE_PRODUCT_RETURN'){
+      this.list = this.$store.state.app.defectiveReturnReason
+    }
+    // 良品
+    if(this.goodFlag == 'GOOD_PRODUCT_RETURN'){
+      this.list = this.$store.state.app.goodReturnReason
+    }
   },
   watch: {
     value(newValue, oldValue) {
-      this.defaultVal = newValue
-    },
+      this.defaultVal = newValue || undefined
+    }
   },
   methods: {
     filterOption(input, option) {
@@ -61,17 +66,11 @@ const ReturnReason = {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       );
     },
-    onChange(value) {
-      console.log(value,'----')
-      this.open = true;
-      const ret = value?value.substr(0,50):''
-      this.defaultVal = ret;
-      this.$emit('change', ret);
-      this.$emit('input', ret);
-    },
-    onBlur(value){
-      this.open = false;
-      this.$emit('blur', value);
+    handleChange(value) {
+      this.defaultVal = value;
+      const row = this.list.find(item => item.code == value)
+      this.$emit('change', value, row);
+      this.$emit('input', value);
     }
   },
 };

+ 14 - 22
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -55,7 +55,7 @@
             <template slot="header">
               <div style="display: flex;">
                 选择产品<span class="sub-title">①输入查询条件--->②查找到需要采购的产品--->③录入采购数量--->④点击“添加”</span>
-                <p class="tag-txt">注意:{{!isDealerUp?'仅限采购【箭冠】产品。':''}}自建产品的采购入库请使用“散件入库”功能</p>
+                <p class="tag-txt">注意:{{ !isDealerUp?'仅限采购【箭冠】产品。':'' }}自建产品的采购入库请使用“散件入库”功能</p>
               </div>
             </template>
             <!-- 选择产品 -->
@@ -128,7 +128,7 @@
                   {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
                 </template>
                 <!-- 产品编码 -->
-                <!-- <template slot="code" slot-scope="text, record">
+                <template slot="code" slot-scope="text, record">
                   <a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
                     <template slot="title">
                       该产品暂时缺货!
@@ -136,7 +136,7 @@
                     <span class="noStock">{{ record.code || '--' }}</span>
                   </a-tooltip>
                   <span v-else>{{ record.code || '--' }}</span>
-                </template> -->
+                </template>
                 <!-- 采购数量 -->
                 <template slot="storageQuantity" slot-scope="text, record">
                   <a-input-number
@@ -205,7 +205,7 @@
                   </a-col>
                   <a-col :span="6">
                     <div style="float:right;overflow: hidden;">
-                      <a-button type="primary" class="button-primary" id="purchaseOrderEdit-import-btn" @click="handleOutStock">上次缺货</a-button>
+                      <a-button v-if="!isDealerUp" type="primary" class="button-primary" id="purchaseOrderEdit-import-btn" @click="handleOutStock">上次缺货</a-button>
                       <a-button id="purchaseOrderEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
                     </div>
                   </a-col>
@@ -327,7 +327,6 @@ export default {
         })
       },
       // -------已选产品-------------
-      orderCountData: null,
       delLoading: false,
       productForm: {
         productName: '',
@@ -339,9 +338,7 @@ export default {
       chooseLoadData: parameter => {
         this.disabled = true
         // 查询总计
-        // const params = Object.assign(parameter, this.productForm, { purchaseBillSn: this.$route.params.sn })
         const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
-        // this.getCountQuery(params)
         return purchaseDetailList(params).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -369,8 +366,6 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        // { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
-        { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '产品名称', dataIndex: 'name', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -384,7 +379,10 @@ export default {
       ]
       // 产品来源
       if (this.isDealerUp) {
+        arr.splice(1, 0, { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true })
         arr.splice(6, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      } else {
+        arr.splice(1, 0, { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true })
       }
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(this.isDealerUp ? 7 : 6, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
@@ -396,28 +394,22 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        // { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '10%', align: 'center' },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '15%', align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '24%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '8%', align: 'center' },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '20%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(4, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(7, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }
   },
   methods: {
-    // 获取采购单明细统计
-    getCountQuery (params) {
-      purchaseDetailCount(params).then(res => {
-        this.orderCountData = res.data || null
-      })
-    },
     // 获取采购单基本信息
     getOrderDetail () {
       purchaseDetailBySn({ sn: this.$route.params.sn }).then(res => {

+ 5 - 4
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -74,7 +74,7 @@
             {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
           </template>
           <!-- 产品编码 -->
-          <!-- <template slot="code" slot-scope="text, record">
+          <template slot="code" slot-scope="text, record">
             <a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
               <template slot="title">
                 该产品暂时缺货!
@@ -82,7 +82,7 @@
               <span class="noStock">{{ record.code || '--' }}</span>
             </a-tooltip>
             <span v-else>{{ record.code || '--' }}</span>
-          </template> -->
+          </template>
           <!-- 采购数量 -->
           <template slot="storageQuantity" slot-scope="text, record">
             <div @dblclick.stop>
@@ -228,8 +228,6 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        // { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '150px', align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'code', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', sorter: true },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '150px', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '在途数', dataIndex: 'transitQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -244,7 +242,10 @@ export default {
       ]
       // 产品来源
       if (this.isDealerUp) {
+        arr.splice(0,0,{ title: '产品编码', scopedSlots: { customRender: 'code' }, width: '150px', align: 'center', fixed: 'left' })
         arr.splice(2, 0, { title: '产品来源', dataIndex: 'sysFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } })
+      }else{
+        arr.splice(0,0,{ title: '产品编码', dataIndex: 'code', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', sorter: true })
       }
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(this.isDealerUp ? 4 : 3, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })

+ 3 - 1
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -24,7 +24,7 @@
               <a-menu-item key="3" v-if="$hasPermissions('M_shoppingCart')">
                 <a-icon type="shopping" /> 购物车
               </a-menu-item>
-              <a-menu-item key="2">
+              <a-menu-item key="2" v-if="!isDealerUp">
                 <a-icon type="funnel-plot" />上次缺货
               </a-menu-item>
               <a-menu-item key="1">
@@ -267,6 +267,7 @@ export default {
         { title: '序号', key: 'a', field: 'no', width: '5%', align: 'center', operationColumn: false },
         { title: '产品编码', key: 'b', field: 'productCode', width: '10%', align: 'center', operationColumn: false },
         { title: '产品名称', key: 'c', field: 'productName', width: '25%', align: 'center', operationColumn: false, ellipsis: { showTitle: true } },
+        { title: '原厂编码', key: 'q', field: 'productOrgCode', width: '15%', align: 'center',operationColumn: false },
         { title: '可用库存', key: 'j', field: 'currentStockQty', width: '10%', align: 'center', operationColumn: false },
         { title: '采购数量',
           key: 'd',
@@ -323,6 +324,7 @@ export default {
           row.discountedPriceText = (row.discountedPrice || row.discountedPrice == 0) ? this.toThousands(row.discountedPrice, 2) : '--'
           row.discountedAmountText = (row.discountedAmount || row.discountedAmount == 0) ? this.toThousands(row.discountedAmount, 2) : '--'
           row.currentStockQty = (row.currentStockQty || row.currentStockQty == 0) ? row.currentStockQty : '--'
+          row.productOrgCode = row.dealerProductEntity.origCode || '--'
         }
         this.localDataSource = data.list
         this.disabled = false

+ 1 - 1
src/views/purchasingManagement/purchaseOutOfStock/detailModal.vue

@@ -77,7 +77,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '缺货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单价', dataIndex: 'price', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },

+ 13 - 11
src/views/purchasingManagement/purchaseReturnApplyForm/chooseImportModal.vue

@@ -86,21 +86,23 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       nowColumns: [
-        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'product.unit', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: '7%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'product.unit', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'exprotQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       loadData: [],
       nowUnColumns: [
-        { title: '序号', dataIndex: 'no', width: '9%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'product.unit', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', dataIndex: 'exprotQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: '7%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'product.unit', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '申请退货数量', dataIndex: 'exprotQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货原因', dataIndex: 'returnReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '错误说明', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       unLoadData: [],

+ 5 - 3
src/views/purchasingManagement/purchaseReturnApplyForm/detail.vue

@@ -21,6 +21,7 @@
               <a-descriptions-item label="采购退货申请单号">{{ basicInfoData&&basicInfoData.purchaseReturnApplyNo || '--' }}</a-descriptions-item>
               <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.returnTargetName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ basicInfoData&&basicInfoData.billStatusDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货类别">{{ basicInfoData&&basicInfoData.goodFlagDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="创建时间">{{ basicInfoData&&basicInfoData.createDate || '--' }}</a-descriptions-item>
               <a-descriptions-item label="客服审核时间">{{ basicInfoData&&basicInfoData.auditTime || '--' }}</a-descriptions-item>
             </a-descriptions>
@@ -110,15 +111,16 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'initQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总公司实收数量', dataIndex: 'receiveQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'badQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '良品数量', dataIndex: 'goodQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'backStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'product.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总公司变更详情', dataIndex: 'modifyInfo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '退货原因', dataIndex: 'returnReason', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备注', dataIndex: 'returnReasonRemarks', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总公司变更详情', dataIndex: 'modifyInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
         arr.splice(9, 0, { title: '退货单价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })

+ 85 - 34
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -6,6 +6,7 @@
         <template slot="subTitle">
           <a id="purchaseReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">供应商名称:箭冠营销中心</span>
+          <span style="margin: 0 15px;color: #666;">退货类别:{{ detailData&&detailData.goodFlagDictValue||'--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_purchaseReturnApplyPrint')">
@@ -74,7 +75,7 @@
               </template>
               <!-- 退货原因 -->
               <template slot="returnReason" slot-scope="text, record">
-                <returnReason v-model="record.returnReason"></returnReason>
+                <returnReason :goodFlag="goodFlag" v-model="record.returnReasonCode"></returnReason>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
@@ -172,13 +173,17 @@
                   v-model="record.initQty"
                   :precision="0"
                   :min="1"
-                  placeholder="请输入"
+                  placeholder="请输入数量"
                   @blur="e => qtyBlur(e.target.value, record)"
                   style="width: 100%;" />
               </template>
               <!-- 退货原因 -->
               <template slot="returnReason" slot-scope="text, record">
-                <returnReason v-model="record.returnReason" @blur="e => remarksBlur(e, record)"></returnReason>
+                <returnReason :goodFlag="goodFlag" v-model="record.returnReasonCode" @change="e => returnReasonChange(e, record, 0)"></returnReason>
+              </template>
+              <!-- 备注 -->
+              <template slot="returnRemarks" slot-scope="text, record">
+                <a-input size="small" placeholder="请输入备注(最多50字符)" :maxLength="50" v-model="record.returnReasonRemarks" @blur="e => returnReasonChange(e, record, 1)"></a-input>
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
@@ -203,16 +208,24 @@
     <!-- 导入明细 -->
     <importGuideModal
       :openModal="openGuideModal"
+      :goodFlag="goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : 0"
       :params="{purchaseReturnApplySn: $route.params.sn, purchaseReturnApplyNo:detailData?detailData.purchaseReturnApplyNo:''}"
       @close="openGuideModal=false"
       @ok="hanldeImprotOk" />
 
     <!-- 批量设置退货原因 -->
     <commonModal modalTit="批量设置退货原因" :openModal="showPlModal" @close="showPlModal=false" @ok="setPlReturnReason">
-      <div style="text-align: center;">
-        <div style="margin-bottom: 15px;font-size: 14px;"><strong>请输入退货原因</strong></div>
+      <div style="text-align: left;">
         <div style="line-height: 24px;">
-          <div><returnReason size="large" v-model="plReturnReason"></returnReason></div>
+          <div><span style="color:red;">*</span>退货原因</div>
+          <div><returnReason size="large" :goodFlag="goodFlag" v-model="plReturnReason"></returnReason></div>
+        </div>
+        <div style="line-height: 24px;margin-top:10px;">
+          <a-checkbox :checked="showEditRemarks" @change="e => showEditRemarks=!showEditRemarks">是否设置备注</a-checkbox>
+        </div>
+        <div style="line-height: 24px;margin-top:10px;" v-if="showEditRemarks">
+          <div>备注</div>
+          <div><a-input size="large" :maxLength="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
         </div>
       </div>
     </commonModal>
@@ -235,7 +248,7 @@ import {
   purchaseReturnDetailDel,
   purchaseReturnDetailDelAll,
   purchaseReturnModifyQty,
-  modifyReturnReason,
+  modifyReturnInfo,
   purchaseReturnSubmit,
   purchaseReturnApplyPrint,
   purchaseReturnApplyExport,
@@ -258,7 +271,7 @@ export default {
       },
       productType: [],
       dataSource: [],
-      returnReasonList: [], // 退货原因列表
+      returnReasonlist: [],
       disabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
       openGuideModal: false, // 导入产品弹框
@@ -266,12 +279,15 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.queryParam.sysFlag = '1' // 剪冠产品
+        this.queryParam.onlineFalg = this.goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : undefined
         return queryDealerScopeProductPage(Object.assign(parameter, this.queryParam)).then(res => {
           const 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
             data.list[i].returnQty = 1
+            data.list[i].returnReasonCode = undefined
+            data.list[i].bakReamrks = data.list[i].returnReasonRemarks
           }
           this.disabled = false
           return data
@@ -289,7 +305,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].qtyBackups = data.list[i].initQty
-            data.list[i].returnReasonBackups = data.list[i].returnReason
+            data.list[i].returnReasonBackups = data.list[i].returnReasonCode
           }
           this.dataSource = data.list
           return data
@@ -297,14 +313,18 @@ export default {
       },
       detailData: null,
       rowSelectionInfo: null,
-      plReturnReason: '',
+      plReturnReason: undefined,
+      plReturnRemark: undefined,
+      showEditRemarks: false,
       showPlModal: false
     }
   },
   watch: {
     showPlModal (newValue, oldValue) {
       if (!newValue) {
-        this.plReturnReason = ''
+        this.plReturnReason = undefined
+        this.plReturnRemark = undefined
+        this.showEditRemarks = false
       }
     }
   },
@@ -312,6 +332,9 @@ export default {
     selNums () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
     },
+    goodFlag () {
+      return this.detailData && this.detailData.goodFlag || ''
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -328,12 +351,13 @@ export default {
     chooseColumns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'product.code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '20%', align: 'center' },
-        { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '17%', align: 'center' },
+        { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' },
         { title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' },
+        { title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -397,11 +421,15 @@ export default {
         this.$message.warning('请输入退货数量')
         return
       }
+      // 退货原因
+      const rows = this.returnReasonlist.find(item => item.code == row.returnReasonCode)
       const params = {
         purchaseReturnApplySn: this.$route.params.sn,
         initQty: row.returnQty, //  退货数量
         productSn: row.productSn,
-        returnReason: row.returnReason
+        returnReasonCode: row.returnReasonCode,
+        returnReason: rows ? rows.dispName : '',
+        goodFlag: this.goodFlag
       }
       this.spinning = true
       purchaseReturnDetailSave(params).then(res => {
@@ -500,23 +528,34 @@ export default {
       }
     },
     // 已选产品 退货原因修改
-    remarksBlur (val, record) {
-      // 空或没有改变时不保存数据
-      if (!record.returnReason || record.returnReason == record.returnReasonBackups) {
-        record.returnReason = record.returnReasonBackups
-        return
+    returnReasonChange (val, record, type) {
+      console.log(val, record, type)
+      const params = {
+        purchaseReturnApplyDetailSn: record.purchaseReturnApplyDetailSn,
+        purchaseReturnApplySn: this.$route.params.sn,
+        goodFlag: this.goodFlag
+      }
+      // 退货原因
+      if (type == 0) {
+        const rows = this.returnReasonlist.find(item => item.code == val)
+        params.returnReasonCode = val || ''
+        params.returnReason = rows ? rows.dispName : ''
+      } else {
+        // 备注
+        params.returnReasonRemarks = val.target.value
+        if (params.returnReasonRemarks == record.bakReamrks) {
+          return
+        }
       }
       this.spinning = true
-      modifyReturnReason({
-        returnReason: record.returnReason,
-        purchaseReturnApplyDetailSn: record.purchaseReturnApplyDetailSn,
-        purchaseReturnApplySn: this.$route.params.sn
-      }).then(res => {
+      modifyReturnInfo(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.chooseTable.refresh()
         } else {
-          record.returnReason = record.returnReasonBackups
+          if (type == 0) {
+            record.returnReasonCode = record.returnReasonBackups
+          }
         }
         this.spinning = false
       })
@@ -530,16 +569,20 @@ export default {
       }
     },
     setPlReturnReason () {
-      if (this.plReturnReason == '') {
-        this.$message.warning('请输入退货原因!')
+      if (!this.plReturnReason) {
+        this.$message.warning('请选择退货原因!')
       } else {
         this.spinning = true
         const snList = []
         const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+        const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
         arr.map(item => {
           snList.push({
             purchaseReturnApplyDetailSn: item.purchaseReturnApplyDetailSn,
-            returnReason: this.plReturnReason
+            returnReason: rows ? rows.dispName : '',
+            returnReasonCode: this.plReturnReason,
+            returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined,
+            goodFlag: this.goodFlag
           })
         })
         modifyReturnReasonList({
@@ -556,16 +599,24 @@ export default {
       }
     },
     // 获取单据详情
-    getDetail () {
+    getDetail (flag) {
       purchaseReturnDetail({ sn: this.$route.params.sn }).then(res => {
         this.detailData = res.data ? res.data : null
+        if (res.data.goodFlag == 'DEFECTIVE_PRODUCT_RETURN') {
+          this.returnReasonlist = this.$store.state.app.defectiveReturnReason
+        }
+        // 良品
+        if (res.data.goodFlag == 'GOOD_PRODUCT_RETURN') {
+          this.returnReasonlist = this.$store.state.app.goodReturnReason
+        }
+        if (flag) {
+          this.$refs.chooseTable.refresh(true)
+          this.resetSearchForm()
+        }
       })
     },
     pageInit () {
-      this.returnReasonList = this.$store.state.app.returnReason
-      this.$refs.chooseTable.refresh(true)
-      this.resetSearchForm()
-      this.getDetail()
+      this.getDetail(true)
     }
   },
   mounted () {

+ 8 - 2
src/views/purchasingManagement/purchaseReturnApplyForm/importGuideModal.vue

@@ -15,7 +15,7 @@
             <span>1</span>准备导入
           </div>
           <ul>
-            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“申请退货数量”、“退货原因”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
+            <li>1) 导入的Excel文件中必须包含名为“产品编码”、“申请退货数量”、“退货原因”、“备注”的列,且名称必须相同,其它列可自定义,不影响数据导入</li>
             <li>2) 如果导入的产品已经存在,则不会导入该行</li>
             <li>
               <a :href="filePath" style="margin: 5px 0 0;display: block;">
@@ -80,6 +80,10 @@ export default {
     params: {
       type: Object,
       default: null
+    },
+    goodFlag: {
+      type: [String,Number],
+      default: ''
     }
   },
   data () {
@@ -91,7 +95,7 @@ export default {
       uploadParams: {
         savePathType: 'local'
       },
-      filePath: location.protocol + '//' +location.host + '/templ/采购退货申请单产品明细模板.xlsx'
+      filePath: ''
     }
   },
   methods: {
@@ -141,6 +145,8 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.resetSearchForm()
+      }else{
+        this.filePath = location.protocol + '//' +location.host + (this.goodFlag==1 ? '/templ/采购退货申请单(良品)产品明细模板.xlsx' : '/templ/采购退货申请单(不良品)产品明细模板.xlsx')
       }
     }
   }

+ 70 - 21
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -21,6 +21,17 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="退货类别">
+                <v-select
+                  v-model="queryParam.goodFlag"
+                  ref="goodFlag"
+                  id="purchaseReturnList-goodFlag"
+                  code="GOOD_FLAG"
+                  placeholder="请选择退货类别"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="采购退货申请单号">
                 <a-input id="purchaseReturnList-purchaseReturnApplyNo" v-model.trim="queryParam.purchaseReturnApplyNo" allowClear placeholder="请输入采购退货申请单号"/>
@@ -116,6 +127,32 @@
 
     <!-- 生成采购退货单 -->
     <creatPurchaseReutn ref="creatPurchaseReutn" :openModal="openCpModal" @close="openCpModal=false" @creatOk="$refs.table.refresh()"></creatPurchaseReutn>
+    <!-- 新建弹框 -->
+    <common-modal
+      :openModal="openTipsModal"
+      modalTit="新建采购退货申请单"
+      okText="确定"
+      @ok="creatReturnOrder"
+      @close="closeCreatModal">
+        <div>
+          <div style="padding:10px 0;">供应商:箭冠营销中心</div>
+          <div style='color:#999;'>
+            <div>说明:</div>
+            <div>1、采购退货申请单提交后,箭冠营销中心系统将能查看到此单并进行后续处理。</div>
+            <div>2、采购退货申请单中的产品,不会占用库存。</div>
+          </div>
+          <div style="display:flex;align-items: center;padding-top: 20px;">
+             <span style="color:red;">*</span>
+             <span>退货类别:</span>
+             <v-select
+               style="width:250px;"
+               v-model="goodFlag"
+               code="GOOD_FLAG"
+               placeholder="请选择退货类别"
+               allowClear></v-select>
+          </div>
+        </div>
+    </common-modal>
   </a-card>
 </template>
 
@@ -125,14 +162,16 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import creatPurchaseReutn from './creatPurchaseReutn.vue'
+import commonModal from '@/views/common/commonModal.vue'
 import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnAgainCreate } from '@/api/purchaseReturnApply'
 export default {
   name: 'PurchaseReturnList',
-  components: { STable, VSelect, rangeDate, creatPurchaseReutn },
+  components: { STable, VSelect, rangeDate, creatPurchaseReutn, commonModal },
   mixins: [commonMixin],
   data () {
     return {
       spinning: false,
+      openTipsModal: false,
       advanced: true, // 高级搜索 展开/关闭
       openCpModal: false,
       time: [
@@ -146,9 +185,11 @@ export default {
         purchaseReturnApplyNo: '', //  退货申请单号
         billStatus: undefined, //  业务状态
         billSource: undefined, // 单据来源
+        goodFlag: undefined, // 退货类别
         beginAuditDate: '', // 审核时间
         endAuditDate: ''
       },
+      goodFlag: undefined,
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
       // 加载数据方法 必须为 Promise 对象
@@ -179,13 +220,14 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '单据来源', dataIndex: 'billSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购退货申请单号', scopedSlots: { customRender: 'purchaseReturnApplyNo' }, width: '14%', align: 'center' },
-        { title: '供应商', dataIndex: 'returnTargetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'returnTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货类别', dataIndex: 'goodFlagDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'totalInitialQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总公司实收数量', dataIndex: 'totalReceiveQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客服审核时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
     }
@@ -214,6 +256,7 @@ export default {
       this.queryParam.purchaseReturnApplyNo = ''
       this.queryParam.billStatus = undefined
       this.queryParam.billSource = undefined
+      this.queryParam.goodFlag = undefined
       this.auditTime = []
       this.$refs.auditDate.resetDate(this.auditTime)
       this.queryParam.beginAuditDate = ''
@@ -253,25 +296,31 @@ export default {
       if (row) { //  编辑
         _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: row.purchaseReturnApplySn } })
       } else { //  新增
-        this.$confirm({
-          title: '提示',
-          content: <div><div style="padding:10px 0;">供应商:箭冠营销中心</div><div style='color:#999;'><div>说明:</div><div>1、采购退货申请单提交后,箭冠营销中心系统将能查看到此单并进行后续处理。</div><div>2、采购退货申请单中的产品,不会占用库存。</div></div></div>,
-          centered: true,
-          onOk () {
-            _this.spinning = true
-            purchaseReturnSave({}).then(res => {
-              if (res.status == 200) {
-                const data = res.data
-                _this.spinning = false
-                // 重置查询条件
-                _this.resetData()
-                _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnApplySn } })
-              } else {
-                _this.spinning = false
-              }
-            })
+        _this.openTipsModal = true
+      }
+    },
+    closeCreatModal(){
+      this.openTipsModal = false
+      this.goodFlag = undefined
+    },
+    creatReturnOrder(){
+      const _this = this
+      if(_this.goodFlag){
+        _this.spinning = true
+        purchaseReturnSave({goodFlag: _this.goodFlag}).then(res => {
+          if (res.status == 200) {
+            const data = res.data
+            _this.spinning = false
+            _this.openTipsModal = false
+            // 重置查询条件
+            _this.resetData()
+            _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnApplySn } })
+          } else {
+            _this.spinning = false
           }
         })
+      }else{
+        this.$message.success("请选择退货类别")
       }
     },
     // 再次编辑

+ 132 - 0
src/views/reportData/salesOutofStockReport/detailModal.vue

@@ -0,0 +1,132 @@
+<template>
+  <a-modal
+    centered
+    class="financialPaymentDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="详情"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="70%">
+    <!-- 详情 -->
+    <div class="mainContent">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="销售单号">{{ (detailsData&&detailsData.salesBillNo) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+        <a-alert type="info" style="margin: 10px 0" v-if="detailsData">
+          <div slot="message">
+            缺货总款数 <strong>{{ (detailsData.totalCategory || detailsData.totalCategory==0) ? detailsData.totalCategory : '--' }}</strong> ,
+            缺货总数量 <strong>{{ (detailsData.totalQty || detailsData.totalQty==0) ? detailsData.totalQty : '--' }}</strong>
+            ,缺货总售价<strong>{{ (detailsData.totalAmount || detailsData.totalAmount==0) ? toThousands(detailsData.totalAmount,2) : '--' }}</strong>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { salesOosQueryDetailList } from '@/api/reportData.js'
+import { STable } from '@/components'
+export default {
+  name: 'FinancialPaymentDetailModal',
+  mixins: [commonMixin],
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '仓库', dataIndex: 'warehouseName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'origCode', width: '13%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
+        { title: '缺货数量', dataIndex: 'qty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货金额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '单位', dataIndex: 'unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      detailsData: null,
+      loadData: parameter => {
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam, { salesOosBillSn: this.detailsData.salesOosBillSn })
+        return salesOosQueryDetailList(params).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.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail (obj) {
+      this.detailsData = obj
+      this.$nextTick(() => {
+        this.$refs.table.refresh()
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.detailsData = null
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .financialPaymentDetail-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .printBox{
+      width:100%;
+      text-align:right;
+      margin-bottom:10px;
+    }
+  }
+</style>

+ 209 - 0
src/views/reportData/salesOutofStockReport/list.vue

@@ -0,0 +1,209 @@
+<template>
+  <div class="jg-page-wrap customerReportList-wrap">
+    <a-card size="small" :bordered="false" class="table-page-search-wrapper">
+      <!-- 搜索条件 -->
+      <a-form-model
+        id="salesOutofStockReport-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="创建时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <custList :isDealerFlag="true" id="salesOutofStockReport-buyerName" ref="custSatelliteList" @change="custSatelliteChange"></custList>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesOutofStockReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesOutofStockReport-reset">重置</a-button>
+            <a-button
+              style="margin-left: 5px"
+              type="primary"
+              class="button-warning"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('B_isSalesOosExport')"
+              id="salesOutofStockReport-export">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            v-if="$hasPermissions('B_isSalesOosDetail')"
+            @click="handleDetail(record)"
+          >详情</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 详情 -->
+    <detail-modal :openModal="openDetailModal" ref="detailModal" @close="openDetailModal = false" />
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
+import detailModal from './detailModal.vue'
+import { salesOosQueryList, salesOosExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, custList, detailModal },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        targetName: undefined, // 客户名称
+        targetSn: undefined // 客户sn
+      },
+      openDetailModal: false, // 详情弹窗
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return salesOosQueryList(params).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
+          return data
+        })
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'targetName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '缺货款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          this.$message.info('请选择创建时间')
+          return false
+        }
+      })
+    },
+    // 查看详情
+    handleDetail (row) {
+      this.openDetailModal = true
+      const _this = this
+      this.$nextTick(() => {
+        _this.$refs.detailModal.getDetail(row)
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    custSatelliteChange (v, row) {
+      if (row && row.customerSn) {
+        this.queryParam.targetSn = row.dealerSn
+        this.queryParam.targetName = row.customerName
+      } else {
+        this.queryParam.targetName = v
+        this.queryParam.targetSn = undefined
+      }
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.targetName = undefined
+      this.queryParam.targetSn = undefined
+      this.$refs.ruleForm.resetFields()
+      this.$refs.custSatelliteList.resetForm()
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          salesOosExport(params).then(res => {
+            downloadExcel(res, '销售缺货报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          this.$message.info('请选择创建时间')
+          return false
+        }
+      })
+    },
+    beforeRouteEnter (to, from, next) {
+      next(vm => {})
+    }
+  }
+}
+</script>

+ 1 - 1
src/views/salesManagement/salesQuery/detail.vue

@@ -233,7 +233,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0, priceFlag: 1 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }

+ 1 - 1
src/views/salesManagement/salesQuery/edit.vue

@@ -344,7 +344,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0 }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: 0, priceFlag: 1 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }

+ 13 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -20,6 +20,7 @@
               <div style="padding:10px;" slot="extendCons">
                 <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
                 <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
+                <a-checkbox v-model="printPrice" :checked="printPrice" id="salesQuery-printPrice">打印售价</a-checkbox>
                 <a-checkbox v-model="printRemarks" :checked="printRemarks" id="salesQuery-printRemarks">打印备注</a-checkbox>
               </div>
             </PrintPanel>
@@ -155,6 +156,7 @@ export default {
       printOrgCode: false, // 打印原创编码
       printAllName: false, // 打印全部名称
       printRemarks: false,
+      printPrice: false,
       showOutInModal: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -240,7 +242,13 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: this.printRemarks ? 1 : 0 }
+      const params = { 
+        sn: this.outBizSn || this.$route.params.sn, 
+        printOrgCode: this.printOrgCode ? 1 : 0, 
+        printAllName: this.printAllName ? 1 : 0, 
+        remarksShowFlag: this.printRemarks ? 1 : 0,
+        priceFlag: this.printPrice ? 1 : 0
+      }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -282,6 +290,7 @@ export default {
         vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.printAllName = localStorage.getItem('printAllName-' + this.$store.state.user.info.orgId) == 'true'
         vm.printRemarks = localStorage.getItem('printRemarks-' + this.$store.state.user.info.orgId) == 'true'
+        vm.printPrice = localStorage.getItem('printPrice-' + this.$store.state.user.info.orgId) == 'true'
         vm.$refs.table.refresh(true)
         vm.getDetail()
       })
@@ -294,6 +303,9 @@ export default {
     printRemarks (newValue, oldValue) {
       localStorage.setItem('printRemarks-' + this.$store.state.user.info.orgId, newValue)
     },
+    printPrice (newValue, oldValue) {
+      localStorage.setItem('printPrice-' + this.$store.state.user.info.orgId, newValue)
+    },
     printAllName (newValue, oldValue) {
       localStorage.setItem('printAllName-' + this.$store.state.user.info.orgId, newValue)
     }

+ 13 - 1
src/views/salesManagement/salesQueryNew/edit.vue

@@ -25,6 +25,7 @@
             <div style="padding:10px;" slot="extendCons">
               <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
               <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
+              <a-checkbox v-model="printPrice" :checked="printPrice" id="salesQuery-printPrice">打印售价</a-checkbox>
               <a-checkbox v-model="printRemarks" :checked="printRemarks" id="salesQuery-printRemarks">打印备注</a-checkbox>
             </div>
           </PrintPanel>
@@ -372,6 +373,7 @@ export default {
       printOrgCode: false, // 打印原创编码
       printAllName: false, // 打印全部名称
       printRemarks: false, // 打印备注
+      printPrice: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -462,7 +464,13 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0, remarksShowFlag: this.printRemarks ? 1 : 0 }
+      const params = { 
+        sn: this.outBizSn || this.$route.params.sn, 
+        printOrgCode: this.printOrgCode ? 1 : 0, 
+        printAllName: this.printAllName ? 1 : 0, 
+        remarksShowFlag: this.printRemarks ? 1 : 0,
+        priceFlag: this.printPrice ? 1 : 0
+      }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -897,6 +905,7 @@ export default {
         vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.printAllName = localStorage.getItem('printAllName-' + this.$store.state.user.info.orgId) == 'true'
         vm.printRemarks = localStorage.getItem('printRemarks-' + this.$store.state.user.info.orgId) == 'true'
+        vm.printPrice = localStorage.getItem('printPrice-' + this.$store.state.user.info.orgId) == 'true'
         vm.getOrderDetail(true)
       })
     }
@@ -908,6 +917,9 @@ export default {
     printAllName (newValue, oldValue) {
       localStorage.setItem('printAllName-' + this.$store.state.user.info.orgId, newValue)
     },
+    printPrice (newValue, oldValue) {
+      localStorage.setItem('printPrice-' + this.$store.state.user.info.orgId, newValue)
+    },
     printRemarks (newValue, oldValue) {
       localStorage.setItem('printRemarks-' + this.$store.state.user.info.orgId, newValue)
     },

+ 1 - 1
vue.config.js

@@ -209,7 +209,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.111/qpls-md',
+        // target: 'http://192.168.2.117/qpls-md',
         target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,