Browse Source

Merge branch 'develop_szhj07' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj07

chenrui 2 years ago
parent
commit
648ebd385c

+ 1 - 1
public/version.json

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

+ 2 - 1
src/components/index.less

@@ -456,9 +456,10 @@
 .ant-alert-message, .ant-card-head{
   color: #000000!important;
 }
-.ant-input-number-disabled,.ant-input-disabled,.ant-select-disabled .ant-select-selection,.ant-input[disabled]{
+.ant-input-number-disabled,.ant-input-disabled,.ant-select-disabled .ant-select-selection,.ant-input[disabled],input[readonly]{
   background-color: #F8F8F8!important;
   color: #333!important;
+  cursor: not-allowed;
 }
 .ant-cascader-picker-disabled .ant-cascader-picker-label{
   color: #333!important;

+ 19 - 2
src/views/numsGoodsShelves/recallManagement/addRecallBillModal.vue

@@ -86,6 +86,8 @@
               v-else
               size="small"
               v-model="record.confirmQty"
+              :readonly="hasChecked(record.id)"
+              @change="changeNums(record)"
               :precision="0"
               :min="1"
               :max="record.recallBillQty?record.qty - record.recallBillQty :record.qty"
@@ -238,6 +240,7 @@ export default {
               const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
               const cur = row.find(item => item.id == data[i].id)
               data[i].confirmQty = cur ? cur.confirmQty : (data[i].confirmQty || data[i].recallBillQty ? data[i].qty - data[i].recallBillQty : data[i].qty)
+              data[i].checked = !cur
             }
           }
           this.spinning = false
@@ -251,6 +254,19 @@ export default {
       // 获取选中列表
       this.rowSelectionInfo = obj || null
     },
+    hasChecked: function (value) {
+      const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+      const cur = row.find(item => item.id == value)
+      return !cur
+    },
+    changeNums (data) {
+      const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+      const cur = row.find(item => item.id == data.id)
+      if (cur) {
+        cur.confirmQty = data.confirmQty
+      }
+      row.splice()
+    },
     //  确定新增回调单
     handleSave () {
       const _this = this
@@ -344,8 +360,9 @@ export default {
         this.$refs.ruleForm.resetFields()
       } else {
         this.$nextTick(() => {
-          this.$refs.recallBillTable.clearSelected();
-          this.resetSearchForm();
+          this.$refs.recallBillTable.clearSelected()
+          this.showChecked = false
+          this.resetSearchForm()
         })
       }
     }

+ 20 - 2
src/views/numsGoodsShelves/replenishmentManagement/creatReplenishmentOrder.vue

@@ -71,7 +71,9 @@
           <template slot="action" slot-scope="text, record">
             <a-input-number
               size="small"
+              :readonly="hasChecked(record.id)"
               v-model="record.replenishQty"
+              @change="changeNums(record)"
               :precision="0"
               :min="1"
               placeholder="请输入"
@@ -151,6 +153,7 @@ export default {
         productName: '', //  产品名称
         stockStateList: []
       },
+      allData: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.spinning = true
@@ -168,10 +171,12 @@ export default {
               const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
               const cur = row.find(item => item.id == data[i].id)
               data[i].replenishQty = cur ? cur.replenishQty : (data[i].replenishBillWaitQty || 1)
+              data[i].checked = !cur
             }
             this.disabled = false
           }
           this.spinning = false
+          this.allData = data
           return data
         })
       },
@@ -192,6 +197,19 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    hasChecked: function (value) {
+      const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+      const cur = row.find(item => item.id == value)
+      return !cur
+    },
+    changeNums (data) {
+      const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+      const cur = row.find(item => item.id == data.id)
+      if (cur) {
+        cur.replenishQty = data.replenishQty
+      }
+      row.splice()
+    },
     // 重置
     resetSearchForm () {
       this.queryParam = {
@@ -199,8 +217,6 @@ export default {
         productName: '', //  产品名称
         stockStateList: []
       }
-      this.showChecked = false
-      this.$refs.table.clearSelected()
       this.$refs.table.refresh(true)
     },
     //  确认补货
@@ -248,6 +264,8 @@ export default {
       } else {
         this.$nextTick(() => {
           this.resetSearchForm()
+          this.$refs.table.clearSelected()
+          this.showChecked = false
         })
       }
     }

+ 0 - 1
src/views/numsGoodsShelves/replenishmentManagement/detailModal.vue

@@ -26,7 +26,6 @@
             <a-descriptions-item label="关联销售单" :span="3" v-if="detailData.billState=='WAIT_CHECK' || detailData.billState=='WAIT_OUT_STOCK' || detailData.billState=='FINISH'">
               <div style="word-break: break-all;">
                 <a
-                  v-if="totalNums"
                   style="margin-right:10px;color:#00aaff;"
                   v-for="item in salesOrderList"
                   :key="item.id"

+ 58 - 18
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -11,7 +11,17 @@
         </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24" v-if="queryParam.bizType=='WAIT_CHECK'">
+              <a-form-item label="出库时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-else-if="queryParam.bizType=='FINISH'">
+              <a-form-item label="签收时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-else>
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
@@ -147,8 +157,8 @@ export default {
       ],
       // 查询参数
       queryParam: {
-        beginDate: getDate.getCurrMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        bDate: getDate.getCurrMonthDays().starttime,
+        eDate: getDate.getCurrMonthDays().endtime,
         bizType: 'ALL',
         replenishBillNo: '',
         shelfSn: undefined,
@@ -156,16 +166,6 @@ export default {
         productName: ''
       },
       expandedRowKeys: [],
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '补货单号', dataIndex: 'replenishBillNo', scopedSlots: { customRender: 'replenishBillNo' }, width: '15%', align: 'center' },
-        { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '补货总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '签收总量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'left' }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -173,6 +173,16 @@ export default {
         this.expandedRowKeys = []
         parameter.billState = this.queryParam.bizType == 'ALL' ? '' : this.queryParam.bizType
         const params = Object.assign(parameter, this.queryParam)
+        if (params.billState == 'WAIT_CHECK') {
+          params.outStockTimeBegin = this.queryParam.bDate
+          params.outStockTimeEnd = this.queryParam.eDate
+        } else if (params.billState == 'FINISH') {
+          params.putStockTimeBegin = this.queryParam.bDate
+          params.putStockTimeEnd = this.queryParam.eDate
+        } else {
+          params.beginDate = this.queryParam.bDate
+          params.endDate = this.queryParam.eDate
+        }
         delete params.index
         delete params.tableId
         delete params.bizType
@@ -223,6 +233,26 @@ export default {
       paramsData: null
     }
   },
+  computed: {
+    columns () {
+      const ret = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '补货单号', dataIndex: 'replenishBillNo', scopedSlots: { customRender: 'replenishBillNo' }, width: '15%', align: 'center' },
+        { title: '货架名称', dataIndex: 'shelfInfo.shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '状态', dataIndex: 'billStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '补货总量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '签收总量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'left' }
+      ]
+      if (this.queryParam.bizType == 'WAIT_CHECK') {
+        ret.splice(1, 1, { title: '出库时间', dataIndex: 'outStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
+      } else if (this.queryParam.bizType == 'FINISH') {
+        ret.splice(1, 1, { title: '签收时间', dataIndex: 'putStockTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      return ret
+    }
+  },
   methods: {
     // 确认
     handleConfirm (row) {
@@ -397,8 +427,8 @@ export default {
     // 重置数据
     resetData () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.bDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.eDate = getDate.getCurrMonthDays().endtime
       this.queryParam.bizType = this.curBizType
       this.queryParam.replenishBillNo = ''
       this.queryParam.shelfSn = undefined
@@ -407,15 +437,15 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0] || null
-      this.queryParam.endDate = date[1] || null
+      this.queryParam.bDate = date[0] || null
+      this.queryParam.eDate = date[1] || null
     },
     // 选择类型
     handleTabChange (key) {
       this.expandedRowKeys = []
       this.queryParam.bizType = key
       this.curBizType = key
-      this.$refs.table.refresh(true)
+      this.resetSearchForm()
     },
     // 客户 change
     custChange (obj) {
@@ -424,6 +454,16 @@ export default {
     // 获取类型
     queryByTypeSum (flag) {
       const params = JSON.parse(JSON.stringify(this.queryParam))
+      if (params.bizType == 'WAIT_CHECK') {
+        params.outStockTimeBegin = this.queryParam.bDate
+        params.outStockTimeEnd = this.queryParam.eDate
+      } else if (params.bizType == 'FINISH') {
+        params.putStockTimeBegin = this.queryParam.bDate
+        params.putStockTimeEnd = this.queryParam.eDate
+      } else {
+        params.beginDate = this.queryParam.bDate
+        params.endDate = this.queryParam.eDate
+      }
       delete params.bizType
       this.spinning = true
       shelfReplenishStateCount(params).then(res => {

+ 2 - 2
src/views/numsGoodsShelves/replenishmentManagement/printStickerModal.vue

@@ -20,7 +20,7 @@
         size="small"
         :rowKey="(record) => record.id"
         rowKeyName="id"
-        :row-selection="{ columnWidth: 40 }"
+        :row-selection="!(basicInfoData&&basicInfoData.billState == 'FINISH' && !basicInfoData.totalPutQty)?{columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.printQty} })}:null"
         @rowSelection="rowSelectionFun"
         :columns="columns"
         :data="loadData"
@@ -44,7 +44,7 @@
         </template>
       </s-table>
       <div class="btn-cont">
-        <a-button type="primary" id="replenishmentManagement-printSticker-modal-save" @click="handleSave">开始打印</a-button>
+        <a-button v-if="!(basicInfoData && basicInfoData.billState == 'FINISH' && !basicInfoData.totalPutQty)" type="primary" id="replenishmentManagement-printSticker-modal-save" @click="handleSave">开始打印</a-button>
         <a-button id="replenishmentManagement-printSticker-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-spin>

+ 14 - 1
src/views/salesManagement/salesQuery/chooseShelfProduct.vue

@@ -68,6 +68,7 @@
               @rowSelection="rowSelectionFun"
               :columns="columns"
               :data="loadData"
+              :style="{ height: '500px' }"
               :scroll="{ y: 450 }"
               :showPagination="false"
               bordered>
@@ -161,6 +162,7 @@
               :rowKey="(record) => record.id"
               :columns="columns1"
               :data="loadData1"
+              :style="{ height: '500px' }"
               :scroll="{ y: 450 }"
               :showPagination="false"
               bordered>
@@ -336,6 +338,17 @@ export default {
     },
     // 添加
     handleAdd (row) {
+      const clist = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+      const blist = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys || []
+      const i = clist.findIndex(item => item.id == row.id)
+      const k = blist.findIndex(item => item == row.id)
+      console.log(i, k)
+      if (i >= 0) {
+        clist.splice(i, 1)
+      }
+      if (k >= 0) {
+        blist.splice(k, 1)
+      }
       this.$emit('add', row)
     },
     // 批量添加
@@ -359,7 +372,7 @@ export default {
       this.$refs.table.refresh(true)
     },
     reload () {
-      this.$refs.table.clearSelected()
+      // this.$refs.table.clearSelected()
       this.$refs.table.refresh()
     },
     // ---------- 全部产品----------

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.182:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.115:8503/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,