Commit 66a15d4a authored by xiangzj's avatar xiangzj

调整终端直配

parent 0eee90ee
......@@ -15,8 +15,8 @@ export default {
}
},
created() {
console.log('2222', this.$route, this.$store, this.$store.getters.token)
const { query, redirectedFrom } = this.$route
console.log('90909', query)
this.urlObj = query
if (this.$store.getters.token) {
if (!redirectedFrom) return this.$router.back()
......@@ -26,13 +26,20 @@ export default {
this.$router.push({ path: redirectedFrom.path, query: { ...this.urlObj }})
}
} else {
this.handleLogin()
this.handleLogin(query.taskToken)
}
},
methods: {
handleLogin() {
handleLogin(taskToken) {
const { query } = this.$route
let token = null
if(taskToken){
token = taskToken
}else{
token = query.taskToken
}
login({
taskToken: this.urlObj.taskToken
taskToken: token,
}).then(resp => {
const { token, operator } = resp.data
this.$store.commit('SET_USERID', operator.userId)
......
......@@ -11,6 +11,8 @@
<van-cell title="制票类型" :value="conditions.noticeSheetTypeTextView" />
<van-cell title="开票客户" :value="conditions.billCustomer" />
<van-cell title="订单客户" :value="conditions.customerName" />
<van-cell title="要货单类型" value="终端直配" class="red" v-if="conditions.demandType == 'ZDZG'"/>
<van-cell title="收货终端" :value="conditions.terminalName" class="red" v-if="conditions.demandType == 'ZDZG'" />
<van-cell title="渠道类型" :value="conditions.channelsTypeTextView" />
<van-cell title="年度" :value="conditions.quotasYear" />
</div>
......@@ -24,6 +26,12 @@
<van-cell title="未发货件数" :value="item.undeliveredQuantity" />
<van-cell title="本月计划剩余数" :value="item.monthLeftQty" />
<van-cell title="本次要货件数" :value="item.wantQuantity" />
<van-cell title="年销售计划量" :value="item.yearSalePlanQty" />
<van-cell title="月销售计划量" :value="item.monthSalePlanQty" />
<van-cell title="当月审批量" :value="item.monthAuditQty" />
<van-cell title="库存量(发货申请时的实时库存)" :value="item.stockQuantity" />
<van-cell title="在途量" :value="item.roadQuantity" />
<van-cell title="已审在发运量" :value="item.auditShipmentQuantity" />
</div>
<van-button
class="download-btn"
......@@ -123,7 +131,7 @@
/>
<van-field
v-model="conditions.receiveUnitName"
label="收货单位"
:label="conditions.demandType == 'ZDZG' ? '收货终端' :'收货单位'"
placeholder=""
error-message=""
disabled
......@@ -265,6 +273,7 @@
</div>
</template>
<script>
import wx from 'weixin-js-sdk'
import Cookies from 'js-cookie'
import { apiWantgoodsFindById } from '@/api/monthPlan.js'
import {
......@@ -448,9 +457,13 @@ export default {
window.open('', '_self', '')
window.close()
this.initDetail()
wx.closeWindow()
}else{
Toast( res && res.msg || '退回异常')
}
} catch (error) {
toast.clear()
Toast('服务异常')
}
return
}
......@@ -530,9 +543,13 @@ export default {
window.open('', '_self', '')
window.close()
this.initDetail()
wx.closeWindow()
}else{
Toast( res && res.msg || '提交异常')
}
} catch (error) {
toast.clear()
Toast('服务异常')
}
}
},
......@@ -547,7 +564,7 @@ export default {
return item.id === this.conditions.taskId
})
if (selfTask) {
if (selfTask.statusId === 'ready') {
if (selfTask.statusId === 'ready' || selfTask.statusId === 'executing') {
this.taskNode = selfTask
}
}
......@@ -639,6 +656,11 @@ export default {
text-align: left;
}
}
.red {
.van-cell__value{
color: #ff1d32;
}
}
}
:deep(.top-detail-block) {
background: #f8f8f8;
......@@ -649,8 +671,10 @@ export default {
background: #f8f8f8;
.van-cell__title {
font-size: 12px;
flex: 2.3;
}
.van-cell__value {
flex: 1;
text-align: right;
}
}
......
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