Commit 2aa0dce4 authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents f08cfb47 9f220cec
...@@ -43,7 +43,7 @@ export function getCustomerPage(query) { ...@@ -43,7 +43,7 @@ export function getCustomerPage(query) {
}) })
} }
// 获得客户下 // 获得客户下
export function getCustomerSelect(query) { export function getCustomerSelect(query) {
return request({ return request({
url: '/ecw/customer/select', url: '/ecw/customer/select',
...@@ -52,6 +52,15 @@ export function getCustomerSelect(query) { ...@@ -52,6 +52,15 @@ export function getCustomerSelect(query) {
}) })
} }
// 根据客户id集合获得客户详情列表
export function getCustomerList(query) {
return request({
url: '/ecw/customer/list',
method: 'get',
params: query
})
}
// 导出客户 Excel // 导出客户 Excel
export function exportCustomerExcel(query) { export function exportCustomerExcel(query) {
return request({ return request({
......
...@@ -52,3 +52,12 @@ export function exportOfferExcel(query) { ...@@ -52,3 +52,12 @@ export function exportOfferExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 更新报价单结果
export function updateOfferResult(data) {
return request({
url: '/ecw/offer/update/result',
method: 'put',
data: data
})
}
\ No newline at end of file
...@@ -93,7 +93,7 @@ export function getCityList(query) { ...@@ -93,7 +93,7 @@ export function getCityList(query) {
// 获得进出口城市 // 获得进出口城市
export function getTradeCityList(query) { export function getTradeCityList(query) {
return request({ return request({
url: '/ecw/region/getCityList', url: '/ecw/region/getTradeCityList',
method: 'get', method: 'get',
params: query params: query
}) })
......
<template>
<el-select
v-model="index"
filterable
clearable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="(item, index) in list"
:key="item.id"
:label="`${item.name}(${item.number})`"
:value="index">
</el-option>
</el-select>
</template>
<script>
import {getCustomerSelect, getCustomer} from '@/api/ecw/customer'
export default {
props:{
productType: [String, Number],
value: [String, Number]
},
data(){
return {
index: {},
list:[],
loading: false
}
},
watch:{
index(val){
this.$emit('input', val !== null ? this.list[val].id : null)
this.$emit('change', val !== null ? this.list[val] : null)
},
value(val){
this.init()
}
},
created(){
this.init()
},
methods:{
init(){
if(!this.value) return null
let index = this.list.findIndex(item => item.id == this.value)
if(index < 0){
getCustomer(this.value).then(res => {
this.list.unshift(res.data)
this.index = 0
})
}
},
remoteMethod(keyword){
let params = {}
params.searchKey = keyword
this.loading = true
getCustomerSelect(params)
.then(res => this.list = res.data)
.finally(() => this.loading = false)
}
}
}
</script>
\ No newline at end of file
...@@ -31,13 +31,14 @@ ...@@ -31,13 +31,14 @@
</el-row> </el-row>
</template> </template>
<script> <script>
import {getCustomerSelect} from '@/api/ecw/customer' import {getCustomerSelect, getCustomerList} from '@/api/ecw/customer'
export default { export default {
props:{
value: [Array]
},
data(){ data(){
return { return {
list:[], list:[],
/* page: 1,
pages: 1, */
queryParams:{ queryParams:{
page: 1, page: 1,
name: null, name: null,
...@@ -58,12 +59,29 @@ export default { ...@@ -58,12 +59,29 @@ export default {
watch:{ watch:{
customerIds(val){ customerIds(val){
this.$emit('input', val) this.$emit('input', val)
},
value(val, old){
if(val.sort().join(',') != old.sort().join(',')){
this.getChoosedList()
}
} }
}, },
created(){ created(){
if(this.value && this.value.length){
this.getChoosedList()
}
this.reLoad() this.reLoad()
}, },
methods:{ methods:{
getChoosedList(){
if(!this.value || !this.value.length){
return
}
getCustomerList({ids: this.value.join(',')})
.then(res => {
this.$set(this, 'choosedList', res.data)
})
},
reLoad(){ reLoad(){
this.queryParams.page = 1 this.queryParams.page = 1
this.list = [] this.list = []
......
<template> <template>
<el-select v-model="valueSync" :multiple="multiple"> <el-select v-model="valueSync" :multiple="multiple" :disabled="disabled">
<el-option v-for="item in optionsFormated" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in optionsFormated" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
options: Array, options: Array,
value: [String, Number, Boolean, Object], value: [String, Number, Boolean, Object],
labelField: { labelField: {
type: String, type: [String, Function],
default: 'label' default: 'label'
}, },
valueField: { valueField: {
...@@ -24,13 +24,14 @@ export default { ...@@ -24,13 +24,14 @@ export default {
multiple: Boolean, multiple: Boolean,
clearable: Boolean, clearable: Boolean,
defaultable: Boolean, // 没有值的时候是否选择第一项 defaultable: Boolean, // 没有值的时候是否选择第一项
disabled: Boolean
}, },
computed:{ computed:{
optionsFormated(){ optionsFormated(){
let arr = [] let arr = []
this.options.forEach(item => { this.options.forEach((item, index) => {
arr.push({ arr.push({
label: item[this.labelField], label: typeof this.labelField == 'string' ? item[this.labelField] : (this.labelField)(item, index),
value: item[this.valueField] value: item[this.valueField]
}) })
}) })
......
...@@ -86,6 +86,11 @@ export const DICT_TYPE = { ...@@ -86,6 +86,11 @@ export const DICT_TYPE = {
ECW_COOPERATION_TYPE: 'cooperation_type', // 合作类型 ECW_COOPERATION_TYPE: 'cooperation_type', // 合作类型
ECW_SHIPPING_DECLARATION_TYPE: 'shipping_declaration_type', // 出货报关方式(与订单报关方式相同) ECW_SHIPPING_DECLARATION_TYPE: 'shipping_declaration_type', // 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE: 'customs_type', // 订单报关方式(非出货报关),优惠券中的单证报关 ECW_CUSTOMS_TYPE: 'customs_type', // 订单报关方式(非出货报关),优惠券中的单证报关
ECW_PACKAGE_TYPE: 'packageType', // 包装单位
ECW_DOUBLE_CLEAR: 'double_clear', // 是否双清
ECW_TRADE_TYPE: 'trade_type', // 交货放肆
ECW_OFFER_RESULT: 'offer_result', // 报单结果 赢单 输单
ECW_WAREHOUSING_TYPE: 'warehousing_type', // 入仓类型
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<div class="fee-item" v-for="(item, index) in fee[1]" :key="index"> <div class="fee-item" v-for="(item, index) in fee[1]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1"> <template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
<el-input v-model="item.fullAmount" style="width:100px" :rules='[costType == 1 ? {required: true, message: "请选择类型"} : null]' /> <el-input v-model="item.fullAmount" style="width:100px" />
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" > <!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> --> </el-select> -->
...@@ -432,7 +432,7 @@ export default { ...@@ -432,7 +432,7 @@ export default {
// status必填 // status必填
data.status = 0 data.status = 0
data.couponIds = this.couponIds.join(',') data.couponIds = this.couponIds.join(',')
// 费用类型 1 运输费 2 清关费 3 总费用(优惠卷专用) // 费用类型 1 运输费 2 清关费 3 总费用(优惠卷专用)
if(this.form.type == 1){ if(this.form.type == 1){
data.costType = 3 data.costType = 3
......
This diff is collapsed.
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="报价单号" prop="offerId">
<div>{{form.offerId}}</div>
</el-form-item>
<el-form-item label="结果" prop="result">
<dict-selector form-type="radio" :type="DICT_TYPE.ECW_OFFER_RESULT" v-model="form.result" />
</el-form-item>
<template v-if="form.result==1">
<el-form-item label="入仓类型" prop="warehousingType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehousingType" />
</el-form-item>
<el-form-item label="关联订单" prop="orderIds">
<el-input v-model="form.orderIds" style="width: 206px;"></el-input>
</el-form-item>
</template>
<template v-else>
<el-form-item label="原因" prop="reason">
<el-input style="width: 500px;" type="textarea" placeholder="" v-model="form.reason"></el-input>
</el-form-item>
</template>
<el-form-item>
<el-button type="primary" @click="submitForm">{{form.result==1?"确定并新增草稿订单":"提交"}}</el-button>
<el-button @click="$router.back()">返 回</el-button>
<el-button type="default" @click="reset">重 置</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { updateOfferResult } from '@/api/ecw/offer';
import CustomersSelector from '@/components/CustomersSelector'
import RoutersSelector from '@/components/RoutersSelector'
import ProductsSelector from '@/components/ProductsSelector'
import Editor from '@/components/Editor'
import Selector from '@/components/Selector/index'
export default {
name: "AttrEdit",
components: { CustomersSelector, RoutersSelector, ProductsSelector, Editor, Selector },
data() {
return {
// 遮罩层
loading: true,
// 表单参数
form: {
"offerId": undefined,
"orderIds": undefined,
"reason": undefined,
"result": 1,
"warehousingType": undefined
},
// 表单校验
rules: {}
};
},
computed: {
},
watch: {
},
created() {
this.reset()
},
methods: {
/** 表单重置 */
reset() {
this.form = {
"offerId": undefined,
"orderIds": undefined,
"reason": undefined,
"result": 1,
"warehousingType": undefined
};
this.resetForm("form");
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
let data = Object.assign({}, this.form)
updateOfferResult(data).then((response) => {
this.$modal.msgSuccess("修改成功");
this.$router.back();
});
});
},
},
};
</script>
\ No newline at end of file
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
} }
// 添加的提交 // 添加的提交
data.productId = this.product.id; data.productId = this.product.id;
data.lineChannelList = this.lineChannelList data.lineChannelList = this.selectedRoutes
createProductPrice(data).then(response => { createProductPrice(data).then(response => {
this.$modal.msgSuccess("请求成功"); this.$modal.msgSuccess("请求成功");
this.$router.replace('/product/product-price') this.$router.replace('/product/product-price')
......
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