|
|
|
@ -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]
|
|
|
|
|