[fix]页面优化-订单列表

develop
huyuanxiang 2 years ago
parent 26b8936525
commit a3e3dd7c90

@ -3,7 +3,7 @@
*/
window._CONFIG = {
//接口父路径
VUE_APP_API_BASE_URL: 'http://store-admin.nhet.cloud:8080/jeecg-boot',
VUE_APP_API_BASE_URL: 'http://47.100.35.222:8080/jeecg-boot',
//单点登录地址
VUE_APP_CAS_BASE_URL: '',
//文件预览路径

@ -24,6 +24,7 @@
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
@ -81,13 +82,21 @@
</template>
<span slot="action" slot-scope="text, record">
<a v-has="'erp:order:edit'" @click="handleEdit(record)"></a>
<a v-if='record.state === 0' v-has="'erp:order:check'" @click="handleConfirm(1, record, )"></a>
<a v-if='record.state === 1' v-has="'erp:order:dispatch'" @click="handleConfirm(2, record, )"></a>
<a-divider type="vertical" />
<a v-has="'erp:order:edit'" @click="handleEdit(record)"> <a-divider type="vertical" /></a>
<a v-if='record.state === 6' v-has="'erp:order:ok'" @click="handleConfirm(0, record, )">
<a-divider type="vertical" />
</a>
<a v-if='record.state === 0' v-has="'erp:order:check'" @click="handleConfirm(1, record, )">
<a-divider type="vertical" />
</a>
<a v-if='record.state === 2' v-has="'erp:order:dispatch'" @click="handleConfirm(3, record, )">
<a-divider type="vertical" />
</a>
<a v-has="'erp:order:print'" @click="handleConfirm(999, record, )">
物料打印 <a-divider type="vertical" /></a>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a class="ant-dropdown-link">
更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
@ -118,22 +127,28 @@
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<a-form-model-item ref="logistics_id" label="物流单号" prop="logistics_id" v-if="rowInfo.state === 2">
<a-input
v-model="form.logistics_id"
@blur="
() => {
$refs.logistics_id.onFieldBlur();
}
"
/>
<!-- <a-form-model-item ref="logistics_id" label="物流单号" prop="logistics_id" v-if="rowInfo.state === 2">-->
<!-- <a-input-->
<!-- v-model="form.logistics_id"-->
<!-- @blur="-->
<!-- () => {-->
<!-- $refs.logistics_id.onFieldBlur();-->
<!-- }-->
<!-- "-->
<!-- />-->
<!-- </a-form-model-item>-->
<a-form-model-item label="上传文件" prop="url" v-if='rowInfo.state === 3'>
<j-image-upload v-model="form.imgUrl" ></j-image-upload>
</a-form-model-item>
<a-form-model-item :label="infoModel.title + '意见'" prop="desc">
<a-form-model-item label="上传文件" prop="url" v-if='rowInfo.state === 1'>
<j-image-upload v-model="form.financeUrl" ></j-image-upload>
</a-form-model-item>
<a-form-model-item :label="'意见'" prop="desc">
<a-input v-model="form.desc" type="textarea" />
</a-form-model-item>
</a-form-model>
<template v-slot:footer>
<a-button key="back" type='danger' :loading="infoModel.confirmLoading" @click="handleOk('cancel')">
<a-button key="back" v-if="rowInfo.state !== 3" type='danger' :loading="infoModel.confirmLoading" @click="handleOk('cancel')">
不通过
</a-button>
<a-button key="submit" type="primary" :loading="infoModel.confirmLoading" @click="handleOk('ok')">
@ -170,7 +185,10 @@
state: -1,
row: {}
},
form: { },
form: {
imgUrl: '',
financeUrl: ''
},
rules: {
},
infoModel: {
@ -188,6 +206,7 @@
deleteBatch: "/erp/order/deleteBatch",
exportXlsUrl: "/erp/order/exportXls",
importExcelUrl: "erp/order/importExcel",
uploadUrl: "sys/common/upload",
},
dictOptions:{},
@ -200,6 +219,9 @@
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
uploadUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.uploadUrl}`;
}
},
methods: {
@ -207,11 +229,14 @@
handleOk(type) {
const that = this
const user = that.userInfo()
if (type === "ok" && that.rowInfo.state === 2 && !that.form.logistics_id) {
this.$message.warn('请填写物流单号')
console.log('that.rowInfo.state', that.rowInfo.state)
// 0 , 1 , 3
// return
if (type === "ok" && that.rowInfo.state === 3 && !that.form.imgUrl) {
this.$message.warn('请上传确认文件')
return
}
if (type === "cancel" && [1, 2].includes(that.rowInfo.state) && !that.form.desc) {
if (type === "cancel" && [0, 1, 3].includes(that.rowInfo.state) && !that.form.desc) {
this.$message.warn('不通过,请填写备注信息')
return
}
@ -234,12 +259,19 @@
params.financeTime = time
params.financeId = user.id
params.financeRemark = that.form.desc
} else if (that.rowInfo.state === 2) {
params.financeUrl = that.form.financeUrl
} else if (that.rowInfo.state === 3) {
params.dispacher = user.realname
params.dispacherId = user.id
params.logisticsId = that.form.logistics_id
params.dispacherTime = time
params.dispacherUrl = that.form.imgUrl
params.dispacherRemark = that.form.desc
} else if (that.rowInfo.state === 0) {
params.materialRemark = that.form.desc
params.materialId = user.id
params.materialClerk = user.realname
params.materialTime = time
}
params = Object.assign({}, that.rowInfo.row, params)
editOrder(params).then(res => {
@ -269,7 +301,12 @@
this.infoModel.visible = false
},
handleConfirm(state, row) {
if (![0, 1].includes(row.state)) {
//
if (state === 999) {
window.open(window._CONFIG['domianURL'] + '/jmreport/shareView/829568033299816448?id=' + row.id)
return
}
if (![6, 0, 2].includes(row.state)) {
this.$message.error('该状态无权限操作')
return
}
@ -278,13 +315,17 @@
const baseObject = {desc: ''}
const baseObjectRules = { desc: [{ message: '填写备注', trigger: 'blur' }]}
const textOBj = {
1: '审核',
2: '派发'
0: '物料确认',
1: '财务审核',
3: '出货确认'
}
const obj = {
1: Object.assign({}, baseObject),
2: Object.assign({
3: Object.assign({
logistics_id: '',
}, baseObject),
0: Object.assign({
material_id: '',
}, baseObject)
}
this.form = obj[state]

@ -10,14 +10,16 @@ export default [
}
},
{
title:'收件人',
title:'订单状态',
align:"center",
dataIndex: 'recipient'
dataIndex: 'state',
scopedSlots: { customRender: 'state' }
},
{
title:'手机',
title:'订单ID',
align:"center",
dataIndex: 'mobile'
dataIndex: 'id'
},
{
title:'总金额',
@ -25,53 +27,58 @@ export default [
dataIndex: 'totalAmount'
},
{
title:'用户id',
title:'创建时间',
align:"center",
dataIndex: 'userId'
dataIndex: 'createTime'
},
{
title:'订单状态',
title:'物料确认人',
align:"center",
dataIndex: 'state',
scopedSlots: { customRender: 'state' }
dataIndex: 'materialClerk'
},
{
title:'下单地址',
title:'物料确认时间',
align:"center",
dataIndex: 'addr'
dataIndex: 'materialTime'
},
{
title:'物料确认意见',
align:"center",
dataIndex: 'materialRemark'
},
{
title:'审核人',
title:'财务确认人',
align:"center",
dataIndex: 'financeReview'
},
{
title:'审核时间',
title:'财务确认时间',
align:"center",
dataIndex: 'financeTime'
},
{
title:'审核意见',
title:'财务确认意见',
align:"center",
dataIndex: 'financeRemark'
},
{
title:'派单人',
title:'出货确认人',
align:"center",
dataIndex: 'dispacher'
},
{
title:'派发时间',
title:'出货确认时间',
align:"center",
dataIndex: 'dispacherTime'
},
// {
// title:'物流单号',
// align:"center",
// dataIndex: 'logisticsId'
// },
{
title:'物流单号',
align:"center",
dataIndex: 'logisticsId'
},
{
title:'派发意见',
title:'出货确认意见',
align:"center",
dataIndex: 'dispacherRemark'
},
@ -81,6 +88,21 @@ export default [
align:"center",
dataIndex: 'remark'
},
{
title:'提货点',
align:"center",
dataIndex: 'recipient'
},
{
title:'提货地址',
align:"center",
dataIndex: 'addr'
},
// {
// title:'手机',
// align:"center",
// dataIndex: 'mobile'
// },
{
title: '操作',
dataIndex: 'action',

@ -5,13 +5,13 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24" >
<a-form-model-item label="收件人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
<a-input v-model="model.recipient" placeholder="请输入收件人" ></a-input>
<a-form-model-item label="订单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="orderState" placeholder="请选择状" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="手机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile">
<a-input v-model="model.mobile" placeholder="请输入手机" ></a-input>
<a-form-model-item label="订单备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" type='textarea' placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
@ -30,38 +30,70 @@
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeReview">
<a-form-model-item label="物料确认人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacher">
<a-input v-model="model.materialClerk" placeholder="请输入确认人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="物料确认时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherTime">
<j-date placeholder="请选择物料确认时间" v-model="model.materialTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="物料确认意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeRemark">
<a-input v-model="model.materialRemark" type='textarea' placeholder="请输入审核意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="财务审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeReview">
<a-input v-model="model.financeReview" placeholder="请输入审核人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="审核时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeTime">
<a-form-model-item label="财务审核时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeTime">
<j-date placeholder="请选择审核时间" v-model="model.financeTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="审核意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeRemark">
<a-input v-model="model.financeRemark" placeholder="请输入审核意见" ></a-input>
<a-form-model-item label="财务审核意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeRemark">
<a-input v-model="model.financeRemark" type='textarea' placeholder="请输入审核意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="付款回执单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.financeUrl" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="派单人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacher">
<a-input v-model="model.dispacher" placeholder="请输入派单人" ></a-input>
<a-form-model-item label="出货确认人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacher">
<a-input v-model="model.dispacher" placeholder="请输入确认人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="派发时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherTime">
<j-date placeholder="请选择派发时间" v-model="model.dispacherTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<a-form-model-item label="出货确认时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherTime">
<j-date placeholder="请选择物料确认时间" v-model="model.dispacherTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="状态,0:待付款 默认1待发货2已发货3完结4退换货" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="orderState" placeholder="请选择状态,0:待付款 默认1待发货2已发货3完结4退换货" />
<a-form-model-item label="出货确认意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeRemark">
<a-input v-model="model.dispacherRemark" type='textarea' placeholder="请输入审核意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="完结确认文件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.dispacherUrl" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
<a-form-model-item label="收件人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
<a-input v-model="model.recipient" placeholder="请输入收件人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="手机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile">
<a-input v-model="model.mobile" placeholder="请输入手机" ></a-input>
</a-form-model-item>
</a-col>
</a-row>

Loading…
Cancel
Save