Commit bf21bf76 authored by ylpmty's avatar ylpmty

更新报价单结果

parent a42c4dd8
......@@ -52,3 +52,12 @@ export function exportOfferExcel(query) {
responseType: 'blob'
})
}
// 更新报价单结果
export function updateOfferResult(data) {
return request({
url: '/ecw/offer/update/result',
method: 'put',
data: data
})
}
\ No newline at end of file
......@@ -86,6 +86,8 @@ export const DICT_TYPE = {
ECW_COOPERATION_TYPE: 'cooperation_type', // 合作类型
ECW_SHIPPING_DECLARATION_TYPE: 'shipping_declaration_type', // 出货报关方式(与订单报关方式相同)
ECW_CUSTOMS_TYPE: 'customs_type', // 订单报关方式(非出货报关),优惠券中的单证报关
ECW_OFFER_RESULT: 'offer_result', // 报单结果 赢单 输单
ECW_WAREHOUSING_TYPE: 'warehousing_type', // 入仓类型
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source',
......
<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
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