Commit f7e0a42f authored by chuan.liu's avatar chuan.liu

发货申请数据联调

parent b82b57b1
module.exports = {
root: true,
env: {
node: true,
node: true
},
extends: ["plugin:vue/vue3-essential", "eslint:recommended", "@vue/prettier"],
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/prettier'],
parserOptions: {
parser: "babel-eslint",
parser: 'babel-eslint'
},
rules: {
'vue/max-attributes-per-line': [
......@@ -261,5 +261,5 @@ module.exports = {
'no-async-promise-executor': 'off',
'require-atomic-updates': 'off',
'no-prototype-builtins': 'off'
},
};
}
}
......@@ -28,4 +28,4 @@ module.exports = {
htmlWhitespaceSensitivity: 'css',
// 换行符使用 lf
endOfLine: 'lf'
};
}
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
"plugins": [
presets: ['@vue/cli-plugin-babel/preset'],
plugins: [
[
"import",
'import',
{
"libraryName": "vant",
"libraryDirectory": "es",
"style": true
libraryName: 'vant',
libraryDirectory: 'es',
style: true
}
]
]
};
}
......@@ -13,7 +13,7 @@
<meta name="screen-orientation" content="portrait" />
<!-- QQ强制竖屏 -->
<meta name="x5-orientation" content="portrait" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link rel="icon" href="<%= BASE_URL %>wly2.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body ontouchstart="">
......
......@@ -6,7 +6,7 @@
<script>
export default {
name: 'App'
name: 'app'
}
</script>
<style lang="scss">
......
// 默认url
export const BASE_API = function () {
export const BASE_API = function() {
return process.env.NODE_ENV === 'production' ? 'crm-app' : 'huigou'
}
......@@ -21,10 +21,10 @@ router.beforeEach(async to => {
if (whiteList.indexOf(to.path) !== -1) {
return true
} else {
return { path: `/login`, query: { ...to.query } }
return { path: `/login`, query: { ...to.query }}
}
} catch (error) {
return { path: `/login`, query: { ...to.query } }
return { path: `/login`, query: { ...to.query }}
}
}
......
......@@ -6,20 +6,20 @@ const HEADER_TOKEN_KEY = 'X-Auth-Token'
/**
* 获取token
*/
const getToken = function () {
const getToken = function() {
return Cookies.get(HEADER_TOKEN_KEY)
}
/**
* 设置token
*/
const setToken = function (token) {
const setToken = function(token) {
return Cookies.set(HEADER_TOKEN_KEY, token)
}
/**
* 删除token
*/
const clearToken = function () {
const clearToken = function() {
return Cookies.remove(HEADER_TOKEN_KEY)
}
......
......@@ -7,7 +7,7 @@
<div class="block" v-for="(item, index) in sourceData" :key="index">
<div class="top-block">
<van-cell title="开票客户" :value="item.customer" />
<van-cell title="发货计划类型" :value="invoiceCondition.planType" />
<van-cell title="发货计划类型" :value="invoiceCondition.planTypeTextView" />
<van-cell title="发票号" :value="item.invoId" />
<van-cell title="开票日期" :value="item.invoiceDate" />
<van-cell title="开票量" :value="item.useQuantity" />
......
......@@ -132,6 +132,7 @@ export default {
console.log('22asssssss', res)
if (res.status === 1) {
Toast('提交成功')
window.close()
}
}
},
......
......@@ -130,6 +130,7 @@ export default {
console.log('22asssssss', res)
if (res.status === 1) {
Toast('提交成功')
window.close()
}
}
},
......
......@@ -7,11 +7,11 @@
<div class="block">
<div class="top-block">
<van-cell title="发运单号" :value="conditions.wantCode" />
<van-cell title="发货计划类型" :value="conditions.planType" />
<van-cell title="制票类型" :value="conditions.noticeSheetType" />
<van-cell title="发货计划类型" :value="conditions.planTypeTextView" />
<van-cell title="制票类型" :value="conditions.noticeSheetTypeTextView" />
<van-cell title="开票客户" :value="conditions.customerName" />
<van-cell title="订单客户" :value="conditions.billCustomer" />
<van-cell title="渠道类型" :value="conditions.channelsType" />
<van-cell title="渠道类型" :value="conditions.channelsTypeTextView" />
<van-cell title="年度" :value="conditions.quotasYear" />
</div>
<div
......@@ -19,7 +19,7 @@
v-for="(item, index) in conditions.wantGoodsDetailList"
:key="index"
>
<van-cell title="产品类别" :value="item.brandBq" />
<van-cell title="产品类别" :value="item.brandBqTextView" />
<van-cell title="产品描述" :value="item.productDesc" />
<van-cell title="未发货件数" :value="item.undeliveredQuantity" />
<van-cell title="本月计划剩余数" :value="item.monthLeftQty" />
......@@ -38,20 +38,22 @@
<div class="block form-block">
<van-cell-group>
<van-field
v-if="taskNode === 'base'"
v-if="isShowBase"
v-model="form.baseAuditQuantity"
:required="taskNode === 'base'"
label="基地审批量"
placeholder=""
/>
<van-field
v-else-if="taskNode === 'warZone'"
v-if="isShowWarZone"
v-model="form.warAuditQuantity"
label="战区审批量"
:required="taskNode === 'warZone'"
placeholder=""
error-message=""
/>
<van-field
v-else-if="taskNode === 'work'"
v-if="isShowWork"
v-model="form.salecenterAuditQuantity"
required
label="内勤审批量"
......@@ -79,7 +81,7 @@
</div>
<div class="block form-block">
<van-cell-group>
<van-field v-model="conditions.isShunt" label="是否分流" placeholder="" />
<van-field v-model="conditions.isShuntTextView" label="是否分流" placeholder="" />
<van-field
v-model="conditions.shuntDealer"
label="分流经销商"
......@@ -87,7 +89,7 @@
error-message=""
/>
<van-field
v-model="conditions.shuntChannelsType"
v-model="conditions.noticeSheetTypeTextView"
label="分流经渠道"
placeholder=""
error-message=""
......@@ -127,7 +129,7 @@
error-message=""
/>
<van-field
v-model="conditions.selfacceptance"
v-model="conditions.selfacceptanceTextView"
label="是否自提"
placeholder=""
error-message=""
......@@ -256,7 +258,16 @@ export default {
}
},
computed: {
...mapGetters['token']
...mapGetters['token'],
isShowBase() {
return this.taskNode === 'base' || this.isShowWarZone || this.isShowWork
},
isShowWarZone() {
return this.taskNode === 'warZone' || this.isShowWork
},
isShowWork() {
return this.taskNode === 'work'
}
},
created() {
const { id, taskId } = this.$route.query
......@@ -277,6 +288,7 @@ export default {
},
checkDetail() {
this.invoiceCondition.planType = this.conditions.planType
this.invoiceCondition.planTypeTextView = this.conditions.planTypeTextView
this.invoiceOccupancyDetailShow = true
// this.$router.push({ name: 'InvoiceOccupancyDetail' })
},
......@@ -285,9 +297,19 @@ export default {
},
initDetail() {
apiWantgoodsFindById(this.conditions).then(res => {
console.log(res.data)
res.data.pyear += ''
this.conditions = { ...this.conditions, ...res.data }
for (const key in this.conditions) {
if (this.conditions.hasOwnProperty(key)) {
if (key === 'isShunt') {
this.conditions.isShuntTextView = this.FormDictionaryForYesOrNot(this.conditions[key])
} else if (key === 'selfacceptance') {
this.conditions.selfacceptanceTextView = this.FormDictionaryForYesOrNot(
this.conditions[key]
)
}
}
}
})
},
flowPath() {
......@@ -313,6 +335,7 @@ export default {
console.log('22asssssss', res)
if (res.status === 1) {
Toast('提交成功')
window.close()
}
}
},
......@@ -332,6 +355,12 @@ export default {
}
}
},
FormDictionaryForYesOrNot(val) {
return {
0: '否',
1: '是'
}[val * 1]
},
onClickLeft() {}
}
}
......
......@@ -2,6 +2,7 @@
const path = require('path')
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/qywx/' : '',
css: {
loaderOptions: {
sass: {
......
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