Commit 2f7c7988 authored by xiangzj's avatar xiangzj

优化

parent 1fd79828
...@@ -16,18 +16,18 @@ export default { ...@@ -16,18 +16,18 @@ export default {
}, },
created() { created() {
console.log('2222', this.$route, this.$store, this.$store.getters.token) console.log('2222', this.$route, this.$store, this.$store.getters.token)
const { query, redirectedFrom } = this.$route const { query } = this.$route
this.urlObj = query this.urlObj = query
if (this.$store.getters.token) { // if (this.$store.getters.token) {
if (!redirectedFrom) return this.$router.back() // if (!redirectedFrom) return this.$router.back()
if (redirectedFrom.path.indexOf('delivery-plan-approve') !== -1) { // if (redirectedFrom.path.indexOf('delivery-plan-approve') !== -1) {
this.$router.push({ name: 'MonthFlow', query: { ...this.urlObj }}) // this.$router.push({ name: 'MonthFlow', query: { ...this.urlObj }})
} else { // } else {
this.$router.push({ path: redirectedFrom.path, query: { ...this.urlObj }}) // this.$router.push({ path: redirectedFrom.path, query: { ...this.urlObj }})
} // }
} else { // } else {
// }
this.handleLogin() this.handleLogin()
}
}, },
methods: { methods: {
handleLogin() { handleLogin() {
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<van-cell title="开票日期" :value="item.invoiceDate" /> <van-cell title="开票日期" :value="item.invoiceDate" />
<van-cell title="开票量" :value="item.useQuantity" /> <van-cell title="开票量" :value="item.useQuantity" />
<van-cell title="本次占用量" :value="item.occupyQty" /> <van-cell title="本次占用量" :value="item.occupyQty" />
<van-cell title="已使用量" :value="item.occupyQty" /> <!-- <van-cell title="已使用量" :value="item.occupyQty" /> -->
<van-cell title="剩余量" value="??" /> <!-- <van-cell title="剩余量" value="??" /> -->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -67,7 +67,12 @@ ...@@ -67,7 +67,12 @@
</div> </div>
<div class="block form-block"> <div class="block form-block">
<van-cell-group> <van-cell-group>
<van-field v-model="conditions.kaStoreShortName" label="卖场简称" placeholder="" disabled/> <van-field
v-model="conditions.kaStoreShortName"
label="卖场简称"
placeholder=""
disabled
/>
<van-field <van-field
v-model="conditions.kaStoreFullName" v-model="conditions.kaStoreFullName"
label="卖场全称" label="卖场全称"
...@@ -86,7 +91,12 @@ ...@@ -86,7 +91,12 @@
</div> </div>
<div class="block form-block"> <div class="block form-block">
<van-cell-group> <van-cell-group>
<van-field v-model="conditions.isShuntTextView" label="是否分流" placeholder="" disabled/> <van-field
v-model="conditions.isShuntTextView"
label="是否分流"
placeholder=""
disabled
/>
<van-field <van-field
v-model="conditions.shuntDealer" v-model="conditions.shuntDealer"
label="分流经销商" label="分流经销商"
...@@ -125,12 +135,22 @@ ...@@ -125,12 +135,22 @@
error-message="" error-message=""
disabled disabled
/> />
<van-field v-model="conditions.contacPerson" label="收货联系人" placeholder="" disabled/> <van-field
v-model="conditions.contacPerson"
label="收货联系人"
placeholder=""
disabled
/>
</van-cell-group> </van-cell-group>
</div> </div>
<div class="block form-block"> <div class="block form-block">
<van-cell-group> <van-cell-group>
<van-field v-model="conditions.contactNumber" label="联系人电话" placeholder="" disabled/> <van-field
v-model="conditions.contactNumber"
label="联系人电话"
placeholder=""
disabled
/>
<van-field <van-field
v-model="conditions.receiveAddress" v-model="conditions.receiveAddress"
...@@ -146,7 +166,7 @@ ...@@ -146,7 +166,7 @@
error-message="" error-message=""
disabled disabled
/> />
<van-field v-model="conditions.remark" label="备注" placeholder="" disabled/> <van-field v-model="conditions.remark" label="备注" placeholder="" disabled />
</van-cell-group> </van-cell-group>
</div> </div>
<div class="block"> <div class="block">
...@@ -169,8 +189,9 @@ ...@@ -169,8 +189,9 @@
<span class="active-dot">{{ index + 1 }}</span> <span class="active-dot">{{ index + 1 }}</span>
</template> </template>
<p class="step-title"> <p class="step-title">
{{ item.statusName }},{{ item.startTime }} {{ item.executorPersonMemberName }} {{ item.statusName }},{{ item.endTime }} {{ item.executorPersonMemberName }}
</p> </p>
<p class="step-title" v-if="item.opinion">意见:{{ item.opinion }}</p>
</van-step> </van-step>
<van-step class="last-step"> <van-step class="last-step">
<template #active-icon> <template #active-icon>
...@@ -216,8 +237,20 @@ ...@@ -216,8 +237,20 @@
<div class="bottom"> <div class="bottom">
<!-- <van-button plain type="primary">确认</van-button> --> <!-- <van-button plain type="primary">确认</van-button> -->
<van-button v-if="pickerVal === '同意'" plain :disabled="!flag" type="primary" @click="submit('1')">确认</van-button> <van-button
<van-button v-else plain :disabled="!flag" type="primary" @click="submit('2')">退回</van-button> v-if="pickerVal === '同意'"
plain
:disabled="!flag"
type="primary"
@click="submit('1')"
>确认</van-button
>
<van-button
v-else
plain :disabled="!flag"
type="primary" @click="submit('2')"
>退回</van-button
>
</div> </div>
<van-popup v-model:show="showPicker" round position="bottom"> <van-popup v-model:show="showPicker" round position="bottom">
...@@ -281,7 +314,7 @@ export default { ...@@ -281,7 +314,7 @@ export default {
groupId: '' groupId: ''
}, },
flag: false, flag: false,
status: '', status: ''
} }
}, },
computed: { computed: {
...@@ -346,7 +379,8 @@ export default { ...@@ -346,7 +379,8 @@ export default {
} }
this.form.baseAuditQuantity = res.data.wantGoodsDetailList[0].baseAuditQuantity || 0 this.form.baseAuditQuantity = res.data.wantGoodsDetailList[0].baseAuditQuantity || 0
this.form.warAuditQuantity = res.data.wantGoodsDetailList[0].warAuditQuantity || 0 this.form.warAuditQuantity = res.data.wantGoodsDetailList[0].warAuditQuantity || 0
this.form.salecenterAuditQuantity = res.data.wantGoodsDetailList[0].salecenterAuditQuantity || 0 this.form.salecenterAuditQuantity =
res.data.wantGoodsDetailList[0].salecenterAuditQuantity || 0
}) })
}, },
flowPath() { flowPath() {
...@@ -357,8 +391,13 @@ export default { ...@@ -357,8 +391,13 @@ export default {
this.stepActive = this.tablePathData.length this.stepActive = this.tablePathData.length
this.selectSelfTask(res.data.Rows) this.selectSelfTask(res.data.Rows)
this.flag = res.data.Rows.some(item => { this.flag = res.data.Rows.some(item => {
return item.executorPersonId === Cookies.get('HEADER_USERID_KEY') && item.statusId === 'ready' && item.id === this.conditions.taskId && this.status - 1 === 0 return (
}); item.executorPersonId === Cookies.get('HEADER_USERID_KEY') &&
(item.statusId === 'executing' || item.statusId === 'ready') &&
item.id === this.conditions.taskId &&
this.status - 1 === 0
)
})
} }
}) })
.catch(() => {}) .catch(() => {})
...@@ -373,7 +412,7 @@ export default { ...@@ -373,7 +412,7 @@ export default {
params.currentHandleId = this.taskNode.procUnitHandlerId params.currentHandleId = this.taskNode.procUnitHandlerId
params.currentHandleGroupId = this.taskNode.groupId params.currentHandleGroupId = this.taskNode.groupId
params.taskId = this.$route.query.taskId params.taskId = this.$route.query.taskId
if(handleResult - 2 === 0){ if (handleResult - 2 === 0) {
const toast = Toast.loading({ const toast = Toast.loading({
message: '提交中...', message: '提交中...',
forbidClick: true forbidClick: true
...@@ -386,6 +425,8 @@ export default { ...@@ -386,6 +425,8 @@ export default {
window.opener = null window.opener = null
window.open('', '_self', '') window.open('', '_self', '')
window.close() window.close()
this.initDetail()
this.flowPath()
} }
} catch (error) { } catch (error) {
toast.clear() toast.clear()
...@@ -396,7 +437,10 @@ export default { ...@@ -396,7 +437,10 @@ export default {
if (this.form.baseAuditQuantity - 0 <= 0 || !Number(this.form.baseAuditQuantity)) { if (this.form.baseAuditQuantity - 0 <= 0 || !Number(this.form.baseAuditQuantity)) {
Toast('请正确填写基地审批量') Toast('请正确填写基地审批量')
return return
} else if (this.form.baseAuditQuantity - 0 > params.wantGoodsDetailList[0].wantQuantity - 0) { } else if (
this.form.baseAuditQuantity - 0 >
params.wantGoodsDetailList[0].wantQuantity - 0
) {
Toast('基地审批数量不能大于本次要货数量') Toast('基地审批数量不能大于本次要货数量')
return return
} }
...@@ -411,7 +455,10 @@ export default { ...@@ -411,7 +455,10 @@ export default {
} }
} }
if (this.isShowWork) { if (this.isShowWork) {
if (this.form.salecenterAuditQuantity - 0 <= 0 || !Number(this.form.salecenterAuditQuantity)) { if (
this.form.salecenterAuditQuantity - 0 <= 0 ||
!Number(this.form.salecenterAuditQuantity)
) {
Toast('请正确填写内勤审批量') Toast('请正确填写内勤审批量')
return return
} else if (this.form.salecenterAuditQuantity - 0 > this.form.warAuditQuantity - 0) { } else if (this.form.salecenterAuditQuantity - 0 > this.form.warAuditQuantity - 0) {
...@@ -432,6 +479,8 @@ export default { ...@@ -432,6 +479,8 @@ export default {
window.opener = null window.opener = null
window.open('', '_self', '') window.open('', '_self', '')
window.close() window.close()
this.initDetail()
this.flowPath()
} }
} catch (error) { } catch (error) {
toast.clear() toast.clear()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment