chenrui 3 vuotta sitten
vanhempi
commit
c5af02b818

+ 19 - 0
src/api/shelf.js

@@ -75,3 +75,22 @@ export const shelfProductBatchInsert = params => {
     method: 'post'
   })
 }
+//  货架监控 列表 不分页
+export const shelfControlList = (params) => {
+  return axios({
+    url: `/shelf/control/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+// 货架监控 出入库明细  分页
+export const shelfPutOutDetailList = (params) => {
+  const url = `/shelf/placeProduct/queryStockPutOutDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

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

@@ -218,7 +218,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'warehouseDetail/:sn',
+                path: 'warehouseDetail/:shelfPlaceSn/:productSn',
                 name: 'shelfMonitoringWarehouseDetail',
                 component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/shelfMonitoring/warehouseDetail.vue'),
                 meta: {

+ 1 - 1
src/views/common/shelfList.vue

@@ -54,7 +54,7 @@ export default {
     },
     handleChange (value) {
       if (value && value.key) {
-        const ind = this.data.findIndex(item => item.customerSn == value.key)
+        const ind = this.data.findIndex(item => item.shelfSn == value.key)
         value.row = ind != -1 ? this.data[ind] : undefined
       }
       Object.assign(this, {

+ 53 - 21
src/views/numsGoodsShelves/shelfMonitoring/addModal.vue

@@ -10,7 +10,7 @@
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-descriptions>
-        <a-descriptions-item label="货架名称">西安车领主常青二路数字货架</a-descriptions-item>
+        <a-descriptions-item label="货架名称">{{ nowData && nowData.shelfInfo && nowData.shelfInfo.shelfName || '--' }}</a-descriptions-item>
       </a-descriptions>
       <!-- 提示 -->
       <a-alert type="info" style="margin-bottom:10px">
@@ -35,17 +35,17 @@
             v-model="record.outQty"
             :precision="0"
             :min="0"
-            :max="record.currentQty"
+            :max="record.qty"
             placeholder="请输入"
             :style="{width: '100%', color: record.outQty==0 ? 'red': ''}" />
         </template>
         <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
+        <template slot="action" slot-scope="text, record, index">
           <a-button
             size="small"
             type="link"
             class="button-primary"
-            @click="handleDel(record)"
+            @click="handleDel(record, index)"
             id="shelfMonitoring-add-btn">移除</a-button>
         </template>
       </a-table>
@@ -71,9 +71,9 @@ export default {
       default: false
     },
     nowData: {
-      type: Array,
+      type: Object,
       default: () => {
-        return []
+        return {}
       }
     }
   },
@@ -83,12 +83,12 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '货位号', dataIndex: 'createDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'allocationLinkagePutNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'outTenantName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '当前库存', dataIndex: 'productTotalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库容', dataIndex: 'productTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滞销天数', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货位号', dataIndex: 'shelfPlaceCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '17%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调货数量', scopedSlots: { customRender: 'outQty' }, width: '10%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -100,19 +100,46 @@ export default {
     //  确认调回
     handleSave () {
       const _this = this
-      let params = {
-        shelfSn: ''
+      const arr = []
+      const arrInd = []
+      this.listData.map((item, index) => {
+        if (item.outQty) {
+          arr.push({
+            shelfPlaceSn: item.shelfPlaceSn,
+            productSn: item.productSn,
+            qty: item.outQty
+          })
+        } else {
+          arrInd.push(index)
+        }
+      })
+      if (arrInd.length > 0) {
+        let str = ''
+        arrInd.map(item => {
+          str += item + '、'
+        })
+        str = str.substr(0, str.length - 1)
+        this.$message.warning('第' + str + '条数据调回数量为空或0,请移除后提交')
+        return
+      }
+      const params = {
+        shelfSn: this.nowData && this.nowData.shelfInfo && this.nowData.shelfInfo.shelfSn,
+        detailList: arr
       }
       shelfRecallSave(params).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           _this.$emit('ok')
-          _this.$message.info('保存并确认成功,返回并刷新列表')
+          _this.isShow = false
+          _this.$message.success('保存并确认成功,返回并刷新列表')
         }
       })
     },
     // 移除
-    handleDel (row) {
-
+    handleDel (row, ind) {
+      this.listData.splice(ind, 1)
+      this.listData.map((item, index) => {
+        item.no = index + 1
+      })
     }
   },
   watch: {
@@ -125,10 +152,15 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.listData = []
-      }else{
-        this.listData = JSON.parse(JSON.stringify(this.nowData))
+      } else {
+        if (this.nowData && this.nowData.list) {
+          this.nowData.list.map((item, index) => {
+            item.no = index + 1
+            item.outQty = item.qty
+          })
+        }
+        this.listData = JSON.parse(JSON.stringify(this.nowData && this.nowData.list || []))
       }
-      console.log(this.nowData, this.listData)
     }
   }
 }

+ 86 - 81
src/views/numsGoodsShelves/shelfMonitoring/list.vue

@@ -15,49 +15,33 @@
           @keyup.enter.native="handleSearch" >
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="货架名称" prop="hjName">
-                <!-- <a-select
-                  placeholder="请选择货架名称"
-                  allowClear
-                  id="shelfMonitoringList-hjName"
-                  v-model="queryParam.hjName"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in hjNameData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-                </a-select> -->
-                <v-select
-                  v-model="queryParam.hjName"
-                  ref="settleState"
-                  id="shelfMonitoringList-settleState"
-                  code="FINANCIAL_PAY_STATUS"
-                  placeholder="请选择货位产品状态"
-                  allowClear></v-select>
+              <a-form-model-item label="货架名称" prop="shelfSn">
+                <shelfSList ref="shelfList" @change="shelfChange" :itemSn="queryParam.shelfSn"></shelfSList>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="货位号">
-                <a-input id="shelfMonitoringList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入货位号"/>
+                <a-input id="shelfMonitoringList-shelfPlaceCode" v-model.trim="queryParam.shelfPlaceCode" allowClear placeholder="请输入货位号"/>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="产品编码">
-                <a-input id="shelfMonitoringList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                <a-input id="shelfMonitoringList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品名称">
-                  <a-input id="shelfMonitoringList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                  <a-input id="shelfMonitoringList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="货位产品状态">
                   <v-select
-                    v-model="queryParam.settleState"
-                    ref="settleState"
-                    id="shelfMonitoringList-settleState"
-                    code="FINANCIAL_PAY_STATUS"
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="shelfMonitoringList-state"
+                    code="SHELF_PRODUCT_STATE"
                     placeholder="请选择货位产品状态"
                     allowClear></v-select>
                 </a-form-model-item>
@@ -68,8 +52,8 @@
                     <a-row>
                       <a-col :span="11">
                         <a-input-number
-                          id="shelfMonitoringList-beginDay"
-                          v-model="queryParam.beginDay"
+                          id="shelfMonitoringList-beginDate"
+                          v-model="queryParam.beginDate"
                           :precision="0"
                           :min="0"
                           :max="999999"
@@ -79,8 +63,8 @@
                       <a-col :span="2"><span style="display: block;text-align: center;line-height: 32px;">至</span></a-col>
                       <a-col :span="11">
                         <a-input-number
-                          id="shelfMonitoringList-endDay"
-                          v-model="queryParam.endDay"
+                          id="shelfMonitoringList-endDate"
+                          v-model="queryParam.endDate"
                           :precision="0"
                           :min="0"
                           :max="999999"
@@ -112,7 +96,7 @@
         <div style="margin-bottom: 10px">
           <div style="display: inline-block;margin-right: 15px;vertical-align: middle;">
             <a-divider type="vertical" style="background: #FF7D0C;width: 3px;heigh: 16px;" />
-            <span>西安车领主常青二路数字货架</span>
+            <span>{{ shelfName || '--' }}</span>
           </div>
           <a-button type="primary" class="button-error" id="shelfMonitoringList-export" @click="handleAddBack">新增调回单</a-button>
           <span style="margin-left: 5px">
@@ -127,15 +111,26 @@
           ref="table"
           :style="{ height: tableHeight+84.5+'px' }"
           size="small"
-          :rowKey="(record) => record.storeCallOutSn"
+          :rowKey="(record) => record.shelfPlaceSn"
           :columns="columns"
           :data="loadData"
-          rowKeyName="storeCallOutSn"
+          rowKeyName="shelfPlaceSn"
           :row-selection="{ columnWidth: 40 }"
           @rowSelection="rowSelectionFun"
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
+          :showPagination="false"
           bordered>
+          <!-- 绑定产品状态 -->
+          <template slot="state" slot-scope="text, record">
+            <a-tooltip placement="top">
+              <template slot="title">
+                <span>{{ record.productTypeName }}</span>
+              </template>
+              {{ record.stateDictValue }}
+              <a-icon type="exclamation-circle" theme="filled" style="color: #39f;font-size: 16px;margin-left: 5px;vertical-align: middle;cursor: pointer;" />
+            </a-tooltip>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
@@ -149,7 +144,7 @@
       </div>
     </a-spin>
     <!-- 新增调回单 -->
-    <add-modal :openModal="openModal" :nowData="rowSelectionInfo&&rowSelectionInfo.selectedRows" @ok="handleOk" @close="handleCancel" />
+    <add-modal :openModal="openModal" :nowData="nowData" @ok="handleOk" @close="handleCancel" />
   </a-card>
 </template>
 
@@ -157,9 +152,10 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import addModal from './addModal.vue'
-import { storeCallOutList } from '@/api/storeCallOut'
+import shelfSList from '@/views/common/shelfList.vue'
+import { shelfControlList } from '@/api/shelf'
 export default {
-  components: { STable, VSelect, addModal },
+  components: { STable, VSelect, addModal, shelfSList },
   mixins: [commonMixin],
   data () {
     return {
@@ -169,25 +165,26 @@ export default {
       wrapperCol: { span: 16 },
       tableHeight: 0,
       queryParam: { //  查询条件
-        hjName: undefined, //  调出对象
-        allocationType: undefined, //  调拨产品类型
-        state: undefined, //  业务状态
-        settleState: undefined,
-        beginDay: undefined,
-        endDay: undefined
+        shelfSn: undefined,
+        shelfPlaceCode: '',
+        productCode: '',
+        productName: '',
+        state: undefined,
+        beginDate: undefined,
+        endDate: undefined
       },
       rules: {
-        'hjName': [{ required: true, message: '请输入货架名称', trigger: 'change' }]
+        'shelfSn': [{ required: true, message: '请选择货架', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '货位号', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '绑定产品编码', dataIndex: 'allocationLinkagePutNo', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '绑定产品名称', dataIndex: 'outTenantName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '货位产品状态', dataIndex: 'allocationTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '当前库存', dataIndex: 'productTotalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '最大库容', dataIndex: 'productTotalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '滞销天数', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '货位号', dataIndex: 'shelfPlaceCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { 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: '货位产品状态', scopedSlots: { customRender: 'state' }, width: '15%', align: 'center' },
+        { title: '当前库存', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库容', dataIndex: 'maxQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '滞销天数', dataIndex: 'unsalableDays', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -196,13 +193,12 @@ export default {
         if (this.checkValueRange()) {
           this.disabled = true
           this.spinning = true
-          return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
+          return shelfControlList(this.queryParam).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
+              for (var i = 0; i < data.length; i++) {
+                data[i].no = i + 1
               }
               this.disabled = false
             }
@@ -214,55 +210,59 @@ export default {
           this.disabled = true
           this.spinning = true
           return new Promise(function (resolve, reject) {
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [],
-              count: 0
-            }
+            const data = []
             _this.disabled = false
             _this.spinning = false
             resolve(data)
           })
         }
       },
-      hjNameData: [],
       rowSelectionInfo: null,
       isSearch: false,
-      openModal: false //  新增编辑  弹框
+      openModal: false, //  新增编辑  弹框
+      shelfName: '', // 货架名称
+      nowData: {
+        list: [],
+        shelfInfo: {}
+      }
     }
   },
   methods: {
     // 校验滞销天数数值范围
     checkValueRange () {
-      const isONull = this.queryParam.beginDay === null || this.queryParam.beginDay === undefined
-      const isOEmpty = this.queryParam.beginDay === ''
-      const isOZero = this.queryParam.beginDay === 0
-      const isTNull = this.queryParam.endDay === null || this.queryParam.endDay === undefined
-      const isTEmpty = this.queryParam.endDay === ''
-      const isTZero = this.queryParam.endDay === 0
+      const isONull = this.queryParam.beginDate === null || this.queryParam.beginDate === undefined
+      const isOEmpty = this.queryParam.beginDate === ''
+      const isOZero = this.queryParam.beginDate === 0
+      const isTNull = this.queryParam.endDate === null || this.queryParam.endDate === undefined
+      const isTEmpty = this.queryParam.endDate === ''
+      const isTZero = this.queryParam.endDate === 0
       //  第一个为空(可为null可为空字符)第二个不为空
       //  第一个不为空第二个为空(可为null可为空字符)
       //  第一个大于第二个
-      if ((isONull || isOEmpty) && (this.queryParam.endDay || isTZero)) {
+      if ((isONull || isOEmpty) && (this.queryParam.endDate || isTZero)) {
         this.$message.info('请输入正确的滞销天数查询范围!')
         return false
       }
-      if ((this.queryParam.beginDay || isOZero) && (isTNull || isTEmpty)) {
+      if ((this.queryParam.beginDate || isOZero) && (isTNull || isTEmpty)) {
         this.$message.info('请输入正确的滞销天数查询范围!')
         return false
       }
-      if (this.queryParam.beginDay > this.queryParam.endDay) {
+      if (this.queryParam.beginDate > this.queryParam.endDate) {
         this.$message.info('请输入正确的滞销天数查询范围!')
         return false
       }
-      this.queryParam.beginDay = this.queryParam.beginDay > 999999999 ? 999999999 : this.queryParam.beginDay
-      this.queryParam.endDay = this.queryParam.endDay > 999999999 ? 999999999 : this.queryParam.endDay
+      this.queryParam.beginDate = this.queryParam.beginDate > 999999999 ? 999999999 : this.queryParam.beginDate
+      this.queryParam.endDate = this.queryParam.endDate > 999999999 ? 999999999 : this.queryParam.endDate
       return true
     },
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 货架  change
+    shelfChange (obj) {
+      this.queryParam.shelfSn = obj.key || undefined
+      this.shelfName = obj && obj.row && obj.row.shelfName || ''
+    },
     //  查询
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
@@ -278,14 +278,14 @@ export default {
     //  重置
     resetSearchForm () {
       this.isSearch = false
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
-      this.queryParam.outTenantSn = undefined
-      this.queryParam.allocationType = undefined
+      this.queryParam.shelfSn = undefined
+      this.$refs.shelfList.resetForm()
+      this.queryParam.shelfPlaceCode = ''
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
       this.queryParam.state = undefined
-      this.queryParam.settleState = undefined
-      this.queryParam.beginDay = undefined
-      this.queryParam.endDay = undefined
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
       this.$refs.ruleForm.resetFields()
       this.$refs.table.clearTable()
     },
@@ -294,16 +294,21 @@ export default {
       if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.length < 1)) {
         this.$message.warning('请至少选择一个产品')
       } else {
+        this.nowData.list = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+        this.nowData.shelfInfo = {
+          shelfName: this.shelfName,
+          shelfSn: this.queryParam.shelfSn
+        }
         this.openModal = true
       }
     },
     //  详情
     handleDetail (row) {
-      // this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/${row.allocationLinkagePutSn}` })
-      this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/1` })
+      this.$router.push({ path: `/numsGoodsShelves/shelfMonitoring/warehouseDetail/${row.shelfPlaceSn}/${row.productSn}` })
     },
     handleOk () {
       this.$refs.table.refresh()
+      this.$refs.table.clearSelected() // 清空表格选中项
       this.isSearch = true
     },
     handleCancel () {

+ 39 - 19
src/views/numsGoodsShelves/shelfMonitoring/warehouseDetail.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="shelfMonitoringWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span class="store-info">西安车领主常青二路数字货架——货位号A01</span>
+          <span class="store-info" v-if="basicInfoData && (basicInfoData.shelfName || basicInfoData.shelfPlaceName)">{{ basicInfoData && basicInfoData.shelfName || '' }} —— {{ basicInfoData && basicInfoData.shelfPlaceName || '' }}</span>
         </template>
       </a-page-header>
       <!-- 内容 -->
@@ -22,9 +22,9 @@
               <a-col :md="6" :sm="24">
                 <a-form-item label="关联单据类型">
                   <v-select
-                    v-model="queryParam.financialStatus"
-                    ref="financialStatus"
-                    id="shelfMonitoringWarehousing-financialStatus"
+                    v-model="queryParam.bizType"
+                    ref="bizType"
+                    id="shelfMonitoringWarehousing-bizType"
                     code="FINANCIAL_PAY_STATUS"
                     placeholder="请选择关联单据类型"
                     allowClear></v-select>
@@ -32,7 +32,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="关联单据号">
-                  <a-input id="shelfMonitoringWarehousing-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入关联单据号"/>
+                  <a-input id="shelfMonitoringWarehousing-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单据号"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -44,6 +44,10 @@
             </a-row>
           </a-form>
         </div>
+        <div style="margin-top: 25px;font-weight: bold;display: flex;align-items: center;">
+          <p style="margin: 0 70px 8px 0;">产品编码:{{ (basicInfoData&&basicInfoData.productCode) || '--' }}</p>
+          <p style="margin: 0 0 8px;">产品名称:{{ (basicInfoData&&basicInfoData.productName) || '--' }}</p>
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable"
@@ -64,7 +68,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { storeCallOutList } from '@/api/storeCallOut'
+import { shelfPutOutDetailList, shelfProductDetail } from '@/api/shelf'
 export default {
   components: { STable, VSelect, rangeDate },
   mixins: [commonMixin],
@@ -76,24 +80,24 @@ export default {
       queryParam: {
         beginDate: undefined,
         endDate: undefined,
-        financialStatus: undefined,
-        purchaseBillNo: ''
+        bizType: undefined,
+        bizNo: ''
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '变动时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'allocationLinkagePutNo', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'outTenantName', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '关联单据类型', dataIndex: 'productTotalQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单据号', dataIndex: 'productTotalCost', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'allocationTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '状态', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '变动时间', dataIndex: 'changeDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '17%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '关联单据类型', dataIndex: 'bizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单据号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '状态', dataIndex: 'stateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return storeCallOutList(Object.assign(parameter, this.queryParam)).then(res => {
+        return shelfPutOutDetailList(Object.assign(parameter, this.queryParam, { shelfPlaceSn: this.$route.params.shelfPlaceSn, productSn: this.$route.params.productSn })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -106,7 +110,8 @@ export default {
           this.spinning = false
           return data
         })
-      }
+      },
+      basicInfoData: null
     }
   },
   methods: {
@@ -115,10 +120,20 @@ export default {
       this.$refs.rangeDate.resetDate()
       this.queryParam.beginDate = undefined
       this.queryParam.endDate = undefined
-      this.queryParam.purchaseBillNo = ''
-      this.queryParam.financialStatus = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.bizNo = ''
       this.$refs.table.refresh(true)
     },
+    // 基本信息
+    getDetail () {
+      shelfProductDetail({ shelfPlaceSn: this.$route.params.shelfPlaceSn, productSn: this.$route.params.productSn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData = res.data
+        } else {
+          this.basicInfoData = null
+        }
+      })
+    },
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/numsGoodsShelves/shelfMonitoring/list' })
@@ -131,12 +146,14 @@ export default {
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.getDetail()
       this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.getDetail()
       this.resetSearchForm()
     }
   }
@@ -152,5 +169,8 @@ export default {
     .shelfMonitoringWarehousing-cont{
       margin-top: 10px;
     }
+    .ant-descriptions-item-label.ant-descriptions-item-colon{
+      width: 120px;
+    }
   }
 </style>

+ 1 - 1
src/views/numsGoodsShelves/shelfSet/bindProductModal.vue

@@ -144,7 +144,7 @@ export default {
     // 产品 change
     productJqChange (obj) {
       this.form.productSn = obj.key || undefined
-      this.productName = obj && obj.row && obj.row.name || '--'
+      this.productName = obj && obj.row && obj.row.name || ''
     },
     //  保存
     handleSave () {