瀏覽代碼

库存 字段更改

chenrui 4 年之前
父節點
當前提交
4aa72f9d79

+ 8 - 8
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -82,7 +82,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1760 }"
+        :scroll="{ x: 1980 }"
         bordered>
         <!-- 数量 -->
         <template slot="qty" slot-scope="text, record">
@@ -118,15 +118,15 @@ export default {
       dateFormat: 'YYYY-MM-DD',
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'product.code', width: 140, align: 'center', fixed: 'left', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'product.origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', fixed: 'left', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库批次时间', dataIndex: 'stockBatchNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位名称', dataIndex: 'unitName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '单位名称', dataIndex: 'unitName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓库', dataIndex: 'warehouseName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', scopedSlots: { customRender: 'qty' }, width: 100, align: 'center' },
         { title: '总成本', dataIndex: 'totalCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }

+ 14 - 10
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -51,9 +51,9 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="预警提示">
                 <v-select
-                  v-model="queryParam.warnTip"
-                  ref="warnTip"
-                  id="inventoryWarningList-warnTip"
+                  v-model="queryParam.stockState"
+                  ref="stockState"
+                  id="inventoryWarningList-stockState"
                   code="STOCK_WARN_TIP"
                   placeholder="请选择预警提示"
                   allowClear
@@ -95,8 +95,9 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :dataSource="loadData"
-      :scroll="{ x: 2120, y: tableHeight }"
+      :scroll="{ x: 2220, y: tableHeight }"
       :pagination="paginationProps"
+      :loading="tableLoading"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">
@@ -109,8 +110,8 @@
         <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
       </template>
       <!-- 预警提示 -->
-      <template slot="warnTip" slot-scope="text, record">
-        <span v-if="record.warnTipDictValue" :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</span>
+      <template slot="stockState" slot-scope="text, record">
+        <span v-if="record.stockStateDictValue" :class="[record.stockState=='OVERFLOW'?'yellow':record.stockState=='NOT_ENOUGH'?'red':record.stockState=='LACK'?'blue':record.stockState=='NORMAL'?'green':'']">{{ record.stockStateDictValue }}</span>
         <span v-else>--</span>
       </template>
       <!-- 在途数 -->
@@ -177,10 +178,11 @@ export default {
         productTypeSn1: undefined,
         productTypeSn2: undefined,
         productTypeSn3: undefined,
-        warnTip: undefined
+        stockState: undefined
       },
       exportLoading: false, // 导出loading
       disabled: false, //  查询、重置按钮是否可操作
+      tableLoading: false, //  表格加载中
       productBrandList: [], //  产品品牌下拉数据
       productTypeList: [], //  产品类别下拉数据
       productType: [],
@@ -193,11 +195,11 @@ export default {
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 180, align: 'center' },
         { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 130, align: 'center' },
-        { title: '总库存数(个)', dataIndex: 'totalStockQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总库存数(个)', dataIndex: 'totalQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 130, align: 'center' },
         { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 130, align: 'center' },
         { title: '差异数量', dataIndex: 'differenceNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '预警提示', scopedSlots: { customRender: 'warnTip' }, width: 100, align: 'center' },
+        { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       loadData: [],
@@ -240,6 +242,7 @@ export default {
       this.disabled = true
       this.pageNo = pageNo || this.pageNo
       const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
+      this.tableLoading = true
       stockWarnList(params).then(res => {
         if (res.status == 200) {
           const data = res.data
@@ -250,6 +253,7 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.loadData = data.list
+          this.tableLoading = false
           this.disabled = false
         } else {
           this.paginationProps.total = 0
@@ -326,7 +330,7 @@ export default {
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
-      this.queryParam.warnTip = undefined
+      this.queryParam.stockState = undefined
       this.productType = []
       this.pageInit(1)
     },