Commit caa82450 by chenwq

发货单加字段

1 parent 2e01460a
...@@ -34,6 +34,7 @@ import * as dayjs from 'dayjs' ...@@ -34,6 +34,7 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import DeliverAdd from './deliverAdd' import DeliverAdd from './deliverAdd'
import DeliverDetail from './deliverDetail' import DeliverDetail from './deliverDetail'
import { membraneTypeList } from '@/utils/constants.js'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList } from '@/utils/constants.js' import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList } from '@/utils/constants.js'
export default { export default {
name: 'PurchaseOrder', name: 'PurchaseOrder',
...@@ -46,7 +47,7 @@ export default { ...@@ -46,7 +47,7 @@ export default {
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
goodsType: '', goodsType: '',
deliveryNumber: '', deliveryNumber: '',
deliveryCompany: '', deliveryCompany: '',
putStatus: '', putStatus: '',
...@@ -155,7 +156,7 @@ export default { ...@@ -155,7 +156,7 @@ export default {
fn: '入库' fn: '入库'
}, },
condition: row => { condition: row => {
return row.putStatus == 1&&row.operatorStatus == 1||row.putStatus == 3&&row.operatorStatus == 1 return row.putStatus == 1 && row.operatorStatus == 1 || row.putStatus == 3 && row.operatorStatus == 1
}, },
listeners: { listeners: {
click: this.handleWarehousing click: this.handleWarehousing
...@@ -185,6 +186,21 @@ export default { ...@@ -185,6 +186,21 @@ export default {
prop: 'goodsTypeName' prop: 'goodsTypeName'
}, },
{ {
label: '发货数量',
prop: '',
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
{
label: '可用库存数量',
prop: '',
width: '120px',
formatter: cellValue => {
return cellValue.stockNum + membraneTypeList.includes(cellValue.goodsType) ? `米` : `件`
}
},
{
label: '承运单号', label: '承运单号',
prop: 'deliveryNumber', prop: 'deliveryNumber',
formatter: cellValue => { formatter: cellValue => {
...@@ -203,7 +219,7 @@ export default { ...@@ -203,7 +219,7 @@ export default {
label: '发货时间', label: '发货时间',
prop: 'deliveryDate', prop: 'deliveryDate',
formatter: cellValue => { formatter: cellValue => {
return cellValue.deliveryDate?dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss'):'--' return cellValue.deliveryDate ? dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
}, },
{ {
...@@ -236,13 +252,13 @@ export default { ...@@ -236,13 +252,13 @@ export default {
merchantName: [], merchantName: [],
storeUsageList: [], storeUsageList: [],
purchaseTypeList: purchaseTypeList, purchaseTypeList: purchaseTypeList,
goodsTypeOptions: [] goodsTypeOptions: []
} }
} }
}, },
mounted() { mounted() {
this.getTypeList() this.getTypeList()
this.$apis.purchaseShopping.getMerchantList({}).then(res => { this.$apis.purchaseShopping.getMerchantList({}).then(res => {
this.baseData.merchantName = res this.baseData.merchantName = res
this.baseData.storeUsageList = res this.baseData.storeUsageList = res
...@@ -253,15 +269,15 @@ export default { ...@@ -253,15 +269,15 @@ export default {
methods: { methods: {
getTypeList() { getTypeList() {
this.$apis.delivery.getTypeList({}).then(res => { this.$apis.delivery.getTypeList({}).then(res => {
this.baseData.goodsTypeOptions = res this.baseData.goodsTypeOptions = res
this.getOptionsList('showFormData', true, 'goodsType') this.getOptionsList('showFormData', true, 'goodsType')
}) })
}, },
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.placeOrderTimeStr.length) { if (this.searchForm.placeOrderTimeStr.length) {
params.deliveryDateStart = dayjs(this.searchForm.placeOrderTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:00' params.deliveryDateStart = dayjs(this.searchForm.placeOrderTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD')+ ' 23:59:59' params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
} }
delete params.placeOrderTimeStr delete params.placeOrderTimeStr
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!