Explorar el Código

列表、详情、编辑页加字段“起止时间”

chenrui hace 3 años
padre
commit
e18878f83c

+ 6 - 2
src/views/allocationManagement/transferOut/detail.vue

@@ -39,6 +39,10 @@
               <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.allocateTypeName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="起止时间">
+                <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
               <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -115,9 +119,9 @@ export default {
     },
     columns () {
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name',width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

+ 18 - 14
src/views/allocationManagement/transferOut/edit.vue

@@ -35,6 +35,10 @@
                 <AllocateType id="allocateEdit-allocateTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateTypeSn"></AllocateType>
               </a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="起止时间">
+                <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
               <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -286,13 +290,13 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode',  width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode',  width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'productPrice',  width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '库存数量', dataIndex: 'currentStockQty',  width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'productUnit', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action1' }, width: '10%',align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action1' }, width: '10%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
         arr.splice(4, 0, { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
@@ -301,15 +305,15 @@ export default {
     },
     chooseColumns () {
       const arr = [
-        { title: '序号', dataIndex: 'no',  width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code',  width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name',  width: '20%',align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode',  width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', scopedSlots: { customRender: 'price' },  width: '10%', align: 'center' },
-        { title: '库存数量', dataIndex: 'currentStockQty',  width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '调出数量', scopedSlots: { customRender: 'qty' },  width: '10%',align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit',  width: '6%',align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' },  width: '6%', align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'center' },
+        { title: '库存数量', dataIndex: 'currentStockQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
         arr.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })

+ 12 - 6
src/views/allocationManagement/transferOut/list.vue

@@ -79,6 +79,11 @@
         <template slot="allocateNo" slot-scope="text, record">
           <span :class="$hasPermissions('M_transferOut_detail')?'active':'common'" @click="handleDetail(record)">{{ record.allocateNo }}</span>
         </template>
+        <!-- 起止时间 -->
+        <template slot="promoDate" slot-scope="text, record">
+          <span v-if="record.promoStartDate || record.promoEndDate">{{ record.promoStartDate }} ~ {{ record.promoEndDate }}</span>
+          <span v-else>--</span>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -168,19 +173,20 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '8.5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '15%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '13.5%' },
+        { title: '起止时间', scopedSlots: { customRender: 'promoDate' }, align: 'center', width: '8%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '8.5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
         arr.splice(6, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })