Commit 308b687c by 前端

Merge branch 'SAAS+V4.39.0-0603' into 'master'

上线合并

See merge request !11
2 parents 0ab2b070 3deff537
This diff could not be displayed because it is too large.
......@@ -42,6 +42,10 @@ export const defaultDeliveryStatusOptions = [
{
id: 2,
label: '全部发货'
},
{
id: 4,
label: '结束发货'
}
]
......
......@@ -2,44 +2,77 @@
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch"
:rowNumber="2"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<h2>采购订单列表</h2>
<div>
<GLButton type="primary" size="small" @click="handleCreatePurchase" fn="创建采购">商城采购</GLButton>
<GLButton type="primary" plain size="small" @click="handlePutStprage" fn="自采入库">自采入库</GLButton>
<el-button size="small" @click="exportExcel">导出</el-button>
<GLButton type="primary"
size="small"
@click="handleCreatePurchase"
fn="创建采购">商城采购</GLButton>
<GLButton type="primary"
plain
size="small"
@click="handlePutStprage"
fn="自采入库">自采入库</GLButton>
<el-button size="small"
@click="exportExcel">导出</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="orderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="deliveryStatus" slot-scope="scope">
<GLTable ref="orderRef"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="deliveryStatus"
slot-scope="scope">
<div>
<span v-if="scope.scope.deliveryStatus" :class="[scope.scope.deliveryStatus == 1 ? 'ashSpot' : scope.scope.deliveryStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span v-if="scope.scope.deliveryStatus"
:class="deliveryStatusOpt[scope.scope.deliveryStatus]"></span>
<span>{{ scope.scope.deliveryStatus | deliveryStatus }}</span>
</div>
</template>
<template slot="putStatus" slot-scope="scope">
<template slot="putStatus"
slot-scope="scope">
<div>
<span v-if="scope.scope.putStatus" :class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span v-if="scope.scope.putStatus"
:class="[scope.scope.putStatus == 1 ? 'ashSpot' : scope.scope.putStatus == 2 ? 'greenSpot' : 'yellowSpot']"></span>
<span>{{ scope.scope.putStatus | putOrderStatus }}</span>
</div>
</template>
<template slot="status" slot-scope="scope">
<template slot="status"
slot-scope="scope">
<div>
<span v-if="scope.scope.status" :class="Spot[scope.scope.status-1]"></span>
<span v-if="scope.scope.status==4||scope.scope.status==6||scope.scope.status==7">已驳回</span>
<span v-else>{{ scope.scope.status | orderStatus }}</span>
<span v-if="scope.scope.status"
:class="Spot[scope.scope.status-1]"></span>
<span
v-if="scope.scope.status==4||scope.scope.status==6||scope.scope.status==7">已驳回</span>
<span v-else>{{ scope.scope.status | orderStatus }}</span>
</div>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<orderDeatilDialog :visible.sync="detailVisible" v-if="detailVisible" :paramsObj="paramsObj"></orderDeatilDialog>
<orderDeatilDialog :visible.sync="detailVisible"
v-if="detailVisible"
:paramsObj="paramsObj"></orderDeatilDialog>
</div>
</template>
......@@ -57,7 +90,7 @@ export default {
return {
size: 'small',
url: url,
Spot:['yellowSpot','yellowSpot','ashSpot','redSpot','greenSpot','redSpot','redSpot'],
Spot: ['yellowSpot', 'yellowSpot', 'ashSpot', 'redSpot', 'greenSpot', 'redSpot', 'redSpot'],
searchForm: {
status: '',
deliveryStatus: '',
......@@ -97,7 +130,7 @@ export default {
isClear: true,
maxlength: 50
},
{
{
label: '订单状态',
name: 'statuses',
type: 'select',
......@@ -181,7 +214,7 @@ export default {
fn: '取消'
},
condition: row => {
return row.status == 1&&row.purchaseType == 1
return row.status == 1 && row.purchaseType == 1
},
listeners: {
click: this.handleCancel
......@@ -301,6 +334,12 @@ export default {
merchantName: [],
storeUsageList: [],
purchaseTypeList: purchaseTypeList
},
deliveryStatusOpt: {
1: "ashSpot",
2: "greenSpot",
3: "yellowSpot",
4: "redSpot"
}
}
},
......@@ -332,12 +371,12 @@ export default {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
if (this.tableSearchForm.statuses) {
if (this.tableSearchForm.statuses == 4) {
this.tableSearchForm.statuses = [4, 6, 7]
} else {
this.tableSearchForm.statuses = [this.tableSearchForm.statuses]
if (this.tableSearchForm.statuses == 4) {
this.tableSearchForm.statuses = [4, 6, 7]
} else {
this.tableSearchForm.statuses = [this.tableSearchForm.statuses]
}
}
}
delete this.tableSearchForm.warehousingTimeStr
delete this.tableSearchForm.placeOrderTimeStr
resolve()
......@@ -361,7 +400,7 @@ export default {
})
this.$refs.orderRef.refreshTable()
})
.catch(() => {})
.catch(() => { })
})
},
handleDispatch(data) {
......@@ -445,9 +484,9 @@ export default {
this.$refs.orderRef.data.length ? (this.$refs.orderRef.tableHeightValues = '') : this.$refs.orderRef.setTableHeightFun()
},
// 创建采购
handleCreatePurchase() {
handleCreatePurchase() {
// let result = await this.checkShipper()
this.$router.push('/purchaseOrder/add')
this.$router.push('/purchaseOrder/add')
},
checkShipper() {
return new Promise(resolve => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!