|
@@ -24,7 +24,17 @@
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
<avue-form ref="form" v-model="form" :option="option">
|
|
|
<template slot="corpId">
|
|
|
- <select-component v-model="form.corpId" :configuration="configuration"></select-component>
|
|
|
+ <select-component
|
|
|
+ v-model="form.corpId"
|
|
|
+ :configuration="configuration"
|
|
|
+ ></select-component>
|
|
|
+ </template>
|
|
|
+ <template slot="exchangeRate">
|
|
|
+ <el-input
|
|
|
+ size="mini"
|
|
|
+ v-model="form.exchangeRate"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d{1,2}).*$/, "$1.$2")'
|
|
|
+ />
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</basic-container>
|
|
@@ -49,7 +59,7 @@
|
|
|
icon="el-icon-printer"
|
|
|
size="small"
|
|
|
@click.stop="openReport()"
|
|
|
- >打 印</el-button
|
|
|
+ >报 表</el-button
|
|
|
>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, label, dic, $index }">
|
|
@@ -135,9 +145,30 @@ import {
|
|
|
} from "@/api/basicData/customerInquiry";
|
|
|
import { orderStates } from "@/enums/order-stauts";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
+import { isvalidatemobile, validatename } from "@/util/validate";
|
|
|
export default {
|
|
|
name: "detailsPageEdit",
|
|
|
data() {
|
|
|
+ const validatePhone = (rule, value, callback) => {
|
|
|
+ if (value != "") {
|
|
|
+ if (isvalidatemobile(value)[0]) {
|
|
|
+ this.$message.error("手机号码格式不正确");
|
|
|
+ callback(new Error(isvalidatemobile(value)[1]));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ const validateName = (rule, value, callback) => {
|
|
|
+ if (value != "") {
|
|
|
+ if (validatename(value)) {
|
|
|
+ this.$message.error("联系人格式不正确");
|
|
|
+ callback(new Error(validatename(value)));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
configuration: {
|
|
|
multipleChoices: false,
|
|
@@ -162,14 +193,14 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "订单状态",
|
|
|
- prop: "status",
|
|
|
+ prop: "orderStatus",
|
|
|
span: 8,
|
|
|
type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
|
|
|
props: {
|
|
|
- label: "name",
|
|
|
- value: "code"
|
|
|
- },
|
|
|
- dicData: orderStates
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: "发票号(PI)",
|
|
@@ -186,17 +217,20 @@ export default {
|
|
|
trigger: "blur"
|
|
|
}
|
|
|
],
|
|
|
- span: 8
|
|
|
+ span: 8,
|
|
|
+ slot: true
|
|
|
},
|
|
|
{
|
|
|
label: "联系人",
|
|
|
prop: "corpAttn",
|
|
|
- span: 8
|
|
|
+ span: 8,
|
|
|
+ rules: [{ validator: validateName, trigger: "blur" }]
|
|
|
},
|
|
|
{
|
|
|
label: "电话",
|
|
|
prop: "corpTel",
|
|
|
- span: 8
|
|
|
+ span: 8,
|
|
|
+ rules: [{ validator: validatePhone, trigger: "blur" }]
|
|
|
},
|
|
|
{
|
|
|
label: "起运港",
|
|
@@ -286,12 +320,19 @@ export default {
|
|
|
{
|
|
|
label: "币别",
|
|
|
prop: "currency",
|
|
|
- span: 8
|
|
|
+ span: 8,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: "汇率",
|
|
|
prop: "exchangeRate",
|
|
|
- span: 8
|
|
|
+ span: 8,
|
|
|
+ slot: true
|
|
|
},
|
|
|
{
|
|
|
label: "信用证编号",
|
|
@@ -398,7 +439,7 @@ export default {
|
|
|
},
|
|
|
selectionChange(list) {
|
|
|
list.map(e => {
|
|
|
- e.itemId = e.code;
|
|
|
+ e.itemId = e.id;
|
|
|
e.priceCategory = e.goodsTypeName;
|
|
|
e.itemUrl = e.url;
|
|
|
e.itemProp = null;
|
|
@@ -448,6 +489,7 @@ export default {
|
|
|
detail(id).then(res => {
|
|
|
this.form = res.data.data;
|
|
|
this.data = res.data.data.orderItemsList;
|
|
|
+ this.configuration.dicData = this.form.corpName;
|
|
|
});
|
|
|
},
|
|
|
//修改提交触发
|