Commit e6ef6ed6 by 王志慧

commit

1 parent 5047e32e
...@@ -17,7 +17,6 @@ export const defaultStatusOptions = [ ...@@ -17,7 +17,6 @@ export const defaultStatusOptions = [
label: "已驳回" label: "已驳回"
} }
] ]
// 发货状态 // 发货状态
export const defaultDeliveryStatusOptions = [ export const defaultDeliveryStatusOptions = [
{ {
...@@ -25,11 +24,28 @@ export const defaultStatusOptions = [ ...@@ -25,11 +24,28 @@ export const defaultStatusOptions = [
label: "未发货" label: "未发货"
}, },
{ {
id: 3,
label: "部分发货"
},
{
id: 2,
label: "全部发货"
}
]
export const putStatusOptions = [
{
id: 1,
label: "未入库"
},
{
id: 3,
label: "部分入库"
}, {
id: 2, id: 2,
label: "已发货" label: "全部入库"
} }
] ]
// 入库状态 // 入库状态
export const defaultPutStatusOptions = [ export const defaultPutStatusOptions = [
{ {
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
fn: '入库' fn: '入库'
}, },
condition: row => { condition: row => {
return row.putStatus == 1 return row.putStatus == 1&&row.operatorStatus == 1
}, },
listeners: { listeners: {
click: this.handleWarehousing click: this.handleWarehousing
......
...@@ -69,19 +69,25 @@ export default { ...@@ -69,19 +69,25 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
prop: 'upgradeGoodsName' prop: 'upgradeGoodsName',
width: 120,
line: 1
}, },
{ {
label: '商品编码', label: '商品编码',
prop: 'type' prop: 'type',
width: 100
}, },
{ {
label: '系列', label: '系列',
prop: 'goodsName' prop: 'goodsName',
width: 100,
line: 1
}, },
{ {
label: '所属分类', label: '所属分类',
prop: 'goodsTypeName' prop: 'goodsTypeName',
width: 100
}, },
{ {
label: '采购数量', label: '采购数量',
...@@ -90,16 +96,18 @@ export default { ...@@ -90,16 +96,18 @@ export default {
let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件` let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
} },
width: 100
}, },
{ {
label: '库存总量', label: '库存总量',
prop: 'goodsTypeName', prop: 'goodsTypeName',
formatter:cellValue=>{ formatter: cellValue => {
let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件` let condition = membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件` return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`
} },
width: 100
}, },
{ {
label: '采购总价/元', label: '采购总价/元',
...@@ -107,23 +115,50 @@ export default { ...@@ -107,23 +115,50 @@ export default {
formatter: cellValue => { formatter: cellValue => {
return '¥' + cellValue.goodsTotalPrice return '¥' + cellValue.goodsTotalPrice
}, },
width: 200 width: 120
},
{
label: '入库仓库',
prop: 'putYqMerchantName'
},
{
label: '入库门店',
prop: 'putMerchantName'
} }
] ]
}, },
detailInfo: {} detailInfo: {}
} }
}, },
created() {
this.dynamicParams()
},
methods: { methods: {
dynamicParams() {
if (this.paramsObj.purchaseType == 1) {
this.tableParams.tableColumns.push(
{
label: '已发货数量',
prop: 'purchaseNumber',
width: 110,
line: 1
},
{
label: '已入库数量',
prop: 'inputNumber',
width: 110,
line: 1
}
)
} else {
this.tableParams.tableColumns.push(
{
label: '入库仓库',
prop: 'putYqMerchantName',
width: 100,
line: 1
},
{
label: '入库门店',
prop: 'putMerchantName',
width: 100,
line: 1
}
)
}
},
handleDetailClose() { handleDetailClose() {
this.dialogShow = false this.dialogShow = false
}, },
...@@ -177,7 +212,7 @@ export default { ...@@ -177,7 +212,7 @@ export default {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.label { .label {
color: #333333; color: #333333;
} }
......
...@@ -431,6 +431,7 @@ li { ...@@ -431,6 +431,7 @@ li {
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
writing-mode: vertical-rl; writing-mode: vertical-rl;
cursor: pointer;
} }
&::after { &::after {
// content: "123"; // content: "123";
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="deliveryStatus" slot-scope="scope"> <template slot="deliveryStatus" slot-scope="scope">
<div> <div>
<span v-if="scope.scope.status" :class="[scope.scope.deliveryStatus == 1 ? 'yellowSpot' : 'greenSpot']"></span> <span v-if="scope.scope.deliveryStatus" :class="[scope.scope.deliveryStatus == 1 ? 'ashSpot' : scope.scope.deliveryStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span>{{ scope.scope.deliveryStatus | deliveryStatus }}</span> <span>{{ scope.scope.deliveryStatus | deliveryStatus }}</span>
</div> </div>
</template> </template>
<template slot="putStatus" slot-scope="scope"> <template slot="putStatus" slot-scope="scope">
<div> <div>
<span :class="[scope.scope.putStatus == 1 ? 'yellowSpot' : 'greenSpot']"></span> <span v-if="scope.scope.putStatus" :class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span>{{ scope.scope.putStatus | putStatus }}</span> <span>{{ scope.scope.putStatus | putStatus }}</span>
</div> </div>
</template> </template>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import orderDeatilDialog from './components/orderDetailDialog' import orderDeatilDialog from './components/orderDetailDialog'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList } from '@/utils/constants.js' import { defaultStatusOptions, defaultDeliveryStatusOptions, putStatusOptions, purchaseTypeList } from '@/utils/constants.js'
export default { export default {
name: 'PurchaseOrder', name: 'PurchaseOrder',
components: { components: {
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
name: 'orderCode', name: 'orderCode',
type: 'input', type: 'input',
isClear: true, isClear: true,
maxlength:20 maxlength: 20
}, },
{ {
label: '订单状态', label: '订单状态',
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
optionList: [], optionList: [],
optionId: 'id', optionId: 'id',
optionLabel: 'label', optionLabel: 'label',
optionsName: 'defaultPutStatusOptions' optionsName: 'putStatusOptions'
}, },
{ {
...@@ -231,6 +231,19 @@ export default { ...@@ -231,6 +231,19 @@ export default {
listeners: { listeners: {
click: this.handleWarehousing click: this.handleWarehousing
} }
},
{
type: 'el-button',
name: '发货单',
attrs: {
type: 'text'
},
condition: row => {
return row.purchaseType == 1 && row.deliveryStatus == 2 ||row.purchaseType == 1 && row.deliveryStatus == 3
},
listeners: {
click: this.handleDispatch
}
} }
], ],
// 表格 // 表格
...@@ -271,23 +284,23 @@ export default { ...@@ -271,23 +284,23 @@ export default {
addHtml: 'deliveryStatus', addHtml: 'deliveryStatus',
width: 120 width: 120
}, },
{ // {
label: '承运公司', // label: '承运公司',
prop: 'deliveryCompany', // prop: 'deliveryCompany',
formatter: cellValue => { // formatter: cellValue => {
return cellValue.deliveryCompany || '--' // return cellValue.deliveryCompany || '--'
}, // },
minWidth: 120 // minWidth: 120
}, // },
{ // {
label: '承运单号', // label: '承运单号',
prop: 'deliveryNumber', // prop: 'deliveryNumber',
formatter: cellValue => { // formatter: cellValue => {
return cellValue.deliveryNumber || '--' // return cellValue.deliveryNumber || '--'
}, // },
width: 120, // width: 120,
line: 1 // line: 1
}, // },
{ {
label: '入库状态', label: '入库状态',
prop: 'putStatus', prop: 'putStatus',
...@@ -338,7 +351,7 @@ export default { ...@@ -338,7 +351,7 @@ export default {
baseData: { baseData: {
defaultStatusOptions: defaultStatusOptions, defaultStatusOptions: defaultStatusOptions,
defaultDeliveryStatusOptions: defaultDeliveryStatusOptions, defaultDeliveryStatusOptions: defaultDeliveryStatusOptions,
defaultPutStatusOptions: defaultPutStatusOptions, putStatusOptions: putStatusOptions,
merchantName: [], merchantName: [],
storeUsageList: [], storeUsageList: [],
purchaseTypeList: purchaseTypeList purchaseTypeList: purchaseTypeList
...@@ -398,6 +411,9 @@ export default { ...@@ -398,6 +411,9 @@ export default {
.catch(() => {}) .catch(() => {})
}) })
}, },
handleDispatch() {
this.$router.push('/DeliverList/index')
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -566,6 +582,7 @@ export default { ...@@ -566,6 +582,7 @@ export default {
@include dot; @include dot;
background: $color-gray; background: $color-gray;
} }
.table-btns /deep/.el-button--text { .table-btns /deep/.el-button--text {
min-width: 0 !important; min-width: 0 !important;
padding: 0; padding: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!