|
@@ -1,406 +1,333 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- v-loading="loading"
|
|
|
- :title="'添加咨询订单'"
|
|
|
- :center="true"
|
|
|
- align="left"
|
|
|
- top="5vh"
|
|
|
- width="1040px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :visible.sync="showModelThis"
|
|
|
- element-loading-text="拼命加载中"
|
|
|
- element-loading-spinner="el-icon-loading"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- @close="showModelThis = false"
|
|
|
- >
|
|
|
- <el-card style="margin-top: -20px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
<el-form
|
|
|
ref="ruleForm"
|
|
|
:model="ruleForm"
|
|
|
status-icon
|
|
|
+ :size="'mini'"
|
|
|
:rules="rulesThis"
|
|
|
- label-width="85px"
|
|
|
- class="demo-ruleForm"
|
|
|
+ label-width="112px"
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="商品分类" prop="class_cat">
|
|
|
+ <el-form-item label="项目名称" prop="name">
|
|
|
<el-input
|
|
|
- v-model="ruleForm.class_cat"
|
|
|
- placeholder="商品分类"
|
|
|
- disabled
|
|
|
+ v-model="ruleForm.name"
|
|
|
+ placeholder="项目名称"
|
|
|
+ maxlength="100"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="商品名称" prop="goods_name">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.goods_name"
|
|
|
- placeholder="商品分类"
|
|
|
- disabled
|
|
|
+ <el-form-item label="所属平台" prop="platform">
|
|
|
+ <search-terrace
|
|
|
+ :value="ruleForm.platform"
|
|
|
+ :disabled="false"
|
|
|
+ :size="'mini'"
|
|
|
+ :isDetail="false"
|
|
|
+ :placeholder="'所属平台'"
|
|
|
+ @searchChange="platform_codesearchChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="销售方" prop="supplierNo">
|
|
|
- <search-supplier
|
|
|
- :value="ruleForm.supplierNo"
|
|
|
+ <el-form-item label="销售方" prop="companyNo">
|
|
|
+ <search-work-company
|
|
|
+ :value="ruleForm.companyNo"
|
|
|
:placeholder="'销售方公司'"
|
|
|
:disabled="false"
|
|
|
+ :size="'mini'"
|
|
|
:isDetail="false"
|
|
|
- :type="'1'"
|
|
|
- @searchChange="supplierChange"
|
|
|
+ @searchChange="company_idsearchChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="购买方" prop="customer_code">
|
|
|
- <!-- <el-form-item label="购买方" prop="customer_code"> -->
|
|
|
+ <el-form-item label="购买方" prop="khNo">
|
|
|
<search-customer
|
|
|
- :value="ruleForm.customer_code"
|
|
|
+ :value="ruleForm.khNo"
|
|
|
:names="ruleForm.customer_name"
|
|
|
:placeholder="'购买方公司'"
|
|
|
+ :size="'mini'"
|
|
|
@searchChange="customerChange"
|
|
|
:disabled="false"
|
|
|
:is-detail="true"
|
|
|
/>
|
|
|
- <!-- </el-form-item> -->
|
|
|
- <!-- <el-input
|
|
|
- v-model="ruleForm.customer_name"
|
|
|
- placeholder="购买方公司"
|
|
|
- disabled
|
|
|
- /> -->
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="商品单价" prop="sale_fee">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.sale_fee"
|
|
|
- placeholder="商品单价"
|
|
|
- disabled
|
|
|
- ><template slot="append">元</template></el-input
|
|
|
- >
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="下单数量" prop="good_num">
|
|
|
- <el-input v-model="ruleForm.good_num" placeholder="下单数量" />
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="项目总预算" prop="budget_total">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.budget_total"
|
|
|
+ :placeholder="'起订量'"
|
|
|
+ :min="0"
|
|
|
+ :max="10000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="budget_total_change"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="商品类型" prop="goodtype">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.goodtype"
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="要求到货时间" prop="arrtime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="ruleForm.arrtime"
|
|
|
+ type="date"
|
|
|
style="width: 100%"
|
|
|
- placeholder="商品类型"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ placeholder="要求到货时间"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in goodtypeOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="发货类型" prop="sendtype">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.sendtype"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="发货类型"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="项目用途" prop="use_desc">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="项目用途"
|
|
|
+ v-model="ruleForm.use_desc"
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <div style="height: 40px" v-if="ruleForm.sendtype === '1'" class="tr">
|
|
|
- <download-addr />
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="addrmodel = true"
|
|
|
- style="margin: 0 0 0 10px"
|
|
|
- >导入收货地址</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <el-form
|
|
|
- v-if="ruleForm.sendtype === '1'"
|
|
|
- :model="addrForm"
|
|
|
- ref="addrForm"
|
|
|
- :size="'mini'"
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="addrForm.addrlist"
|
|
|
- border
|
|
|
- max-height="300px"
|
|
|
- :size="'mini'"
|
|
|
- style="width: 100%"
|
|
|
- row-key="key"
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- prop="receipt_quantity"
|
|
|
- label="收货总数"
|
|
|
- width="100"
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- prop="arrive_time"
|
|
|
- label="最晚收货日期"
|
|
|
- width="110"
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column prop="contactor" label="收件联系人" width="110" />
|
|
|
-
|
|
|
- <el-table-column prop="mobile" label="收货联系电话" width="110" />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- prop="addr_code_name"
|
|
|
- label="收货省市区"
|
|
|
- min-width="230"
|
|
|
- />
|
|
|
- <el-table-column prop="addr" label="详细地址" min-width="170" />
|
|
|
-
|
|
|
- <el-table-column fixed="right" width="80">
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
- <span>操作</span>
|
|
|
-
|
|
|
- <el-tooltip
|
|
|
- class="fr"
|
|
|
- style="margin: 3px 0 0 0"
|
|
|
- effect="dark"
|
|
|
- content="添加"
|
|
|
- placement="top"
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="商品要求" prop="ladder">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ :size="'mini'"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ style="width: 100%; margin: 0 0 20px 0"
|
|
|
>
|
|
|
- <i
|
|
|
- class="el-icon-circle-plus-outline tb-icon"
|
|
|
- style="color: #63cbe7"
|
|
|
- @click="openHouseModal(-1)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- content="编辑"
|
|
|
- v-if="!scope.row.edit"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-edit tb-icon"
|
|
|
- @click="openHouseModal(scope.$index)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
+ <el-table-column label="商品阶梯">
|
|
|
+ <template slot-scope="scope"> {{ scope.$index }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="good_type" label="商品类型" />
|
|
|
+ <el-table-column prop="good_name" label="商品名称" />
|
|
|
+ <el-table-column prop="good_img" label="商品图片" />
|
|
|
+ <el-table-column prop="cat_id" label="商品分类" />
|
|
|
+ <el-table-column prop="budget_price" label="预算单价" />
|
|
|
+ <el-table-column prop="num" label="购买数量" />
|
|
|
|
|
|
- <el-tooltip effect="dark" content="删除" placement="top">
|
|
|
- <i
|
|
|
- class="el-icon-delete tb-icon"
|
|
|
- @click="deleteRow(scope.$index, addrForm.addrlist)"
|
|
|
- ></i>
|
|
|
- </el-tooltip>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-form>
|
|
|
- <in-addr-model
|
|
|
- :show-model="addrmodel"
|
|
|
- @cancel="addrmodel = false"
|
|
|
- @refresh="addrRefresh"
|
|
|
- />
|
|
|
+ <el-table-column fixed="right">
|
|
|
+ <template slot="header" slot-scope="scope">
|
|
|
+ <span>操作</span>
|
|
|
+ <el-tooltip
|
|
|
+ effect="dark"
|
|
|
+ content="添加阶梯"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ class="el-icon-circle-plus-outline tb-icon fr"
|
|
|
+ @click="openCostEdit(-1, {})"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip effect="dark" content="修改" placement="top">
|
|
|
+ <i
|
|
|
+ class="el-icon-edit tb-icon"
|
|
|
+ @click="openCostEdit(scope.$index, scope.row)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
- <addr-add-edit-modal
|
|
|
- :showModel="showAddrAddEditModal"
|
|
|
- :index="AddrAddEditModalIndex"
|
|
|
- :sitem="AddrAddEditModalSitem"
|
|
|
- @cancel="showAddrAddEditModal = false"
|
|
|
- @refresh="showAddrAddEditModalRefresh"
|
|
|
- />
|
|
|
- <div style="text-align: right">
|
|
|
- <el-button type="primary" :size="'mini'" @click="submitForm"
|
|
|
- >保 存
|
|
|
- </el-button>
|
|
|
- <el-button :size="'mini'" @click="showModelThis = false">{{
|
|
|
- isDetail ? "关 闭" : "取 消"
|
|
|
- }}</el-button>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-dialog>
|
|
|
+ <el-tooltip effect="dark" content="删除" placement="top">
|
|
|
+ <i
|
|
|
+ class="el-icon-delete tb-icon"
|
|
|
+ @click="openCostEditDelete(scope.$index)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- 弹窗 新增/修改 -->
|
|
|
+ <cost-form-add-edit
|
|
|
+ :index="costmodelIndex"
|
|
|
+ :show-model="costshowModel"
|
|
|
+ :sitem="costsitem"
|
|
|
+ @refresh="costrefreshEdit"
|
|
|
+ @cancel="costshowModel = false"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="text-align: right">
|
|
|
+ <el-button type="primary" :size="'mini'" @click="submitForm"
|
|
|
+ >保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button :size="'mini'" @click="showModelThis = false">{{
|
|
|
+ isDetail ? "关 闭" : "取 消"
|
|
|
+ }}</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
<script>
|
|
|
import asyncRequest from "@/apis/service/sheetOrder/project";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
-import inAddrModel from "@/components/in-addr-model";
|
|
|
-import AddrAddEditModal from "@/components/addr-add-edit-modal";
|
|
|
-import { isnumber } from "@/utils/validate";
|
|
|
+import costFormAddEdit from "./costFormAddEdit";
|
|
|
+
|
|
|
export default {
|
|
|
name: "Account",
|
|
|
props: ["showModel", "sitem"],
|
|
|
mixins: [resToken],
|
|
|
- components: { inAddrModel, AddrAddEditModal },
|
|
|
+ components: { costFormAddEdit },
|
|
|
+ watch: {
|
|
|
+ // showModel: function (val) {
|
|
|
+ // this.showModelThis = val;
|
|
|
+ // if (val) {
|
|
|
+ // this.initForm();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // showModelThis(val) {
|
|
|
+ // if (!val) {
|
|
|
+ // this.$emit("cancel");
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ },
|
|
|
data() {
|
|
|
- const validateWeight = (rule, value, callback) => {
|
|
|
- if (value === "") {
|
|
|
- callback(new Error("不能为空!"));
|
|
|
- } else {
|
|
|
- if (!isnumber(value)) {
|
|
|
- callback(new Error("仅支持整数!"));
|
|
|
- } else {
|
|
|
- callback();
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
return {
|
|
|
loading: false,
|
|
|
- showAddrAddEditModal: false,
|
|
|
- AddrAddEditModalIndex: -1,
|
|
|
- AddrAddEditModalSitem: {},
|
|
|
-
|
|
|
- showModelThis: this.showModel,
|
|
|
- addrmodel: false,
|
|
|
- supplierNo: "",
|
|
|
- options: [
|
|
|
- {
|
|
|
- value: "1",
|
|
|
- label: "直接发货",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "延迟发货",
|
|
|
+ tableData: [],
|
|
|
+ costshowModel: false,
|
|
|
+ costmodelIndex: "",
|
|
|
+ costsitem: {},
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ return time.getTime() <= Date.now();
|
|
|
},
|
|
|
- ],
|
|
|
- goodtypeOptions: [
|
|
|
- {
|
|
|
- value: "1",
|
|
|
- label: "普通商品",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "2",
|
|
|
- label: "赠品",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "3",
|
|
|
- label: "样品",
|
|
|
- },
|
|
|
- ],
|
|
|
- addrForm: {
|
|
|
- addrlist: [],
|
|
|
},
|
|
|
ruleForm: {
|
|
|
- zxNo: "",
|
|
|
- customer_code: [],
|
|
|
- supplierNo: [],
|
|
|
- sendtype: "1",
|
|
|
- good_num: "",
|
|
|
- goodtype: "1",
|
|
|
- class_cat: "",
|
|
|
- goods_name: "",
|
|
|
- sale_fee: "",
|
|
|
+ name: "",
|
|
|
+ platform: [],
|
|
|
+ companyNo: "",
|
|
|
+ khNo: [],
|
|
|
+ customer_name: "",
|
|
|
+ budget_total: "",
|
|
|
+ arrtime: "",
|
|
|
+ use_desc: "",
|
|
|
+ ladder: [],
|
|
|
},
|
|
|
rulesThis: this.rules,
|
|
|
rules: {
|
|
|
- zxNo: [
|
|
|
+ name: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "咨询单号不能为空!",
|
|
|
+ message: "项目名称不能为空!",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- customer_code: [
|
|
|
+ platform: [
|
|
|
{
|
|
|
+ type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择购买方公司",
|
|
|
+ message: "请选择所属平台",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- class_cat: [
|
|
|
+ companyNo: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请选择商品分类",
|
|
|
+ message: "请选择销售方公司",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- supplierNo: [
|
|
|
+ khNo: [
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择销售方公司",
|
|
|
+ message: "请选择购买方公司",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- sendtype: [
|
|
|
+
|
|
|
+ budget_total: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请选择发货类型",
|
|
|
- trigger: "change",
|
|
|
+ message: "项目总预算",
|
|
|
+ trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
|
|
|
- good_num: [
|
|
|
+ arrtime: [
|
|
|
{
|
|
|
required: true,
|
|
|
- validator: validateWeight,
|
|
|
- trigger: "blur",
|
|
|
+ message: "要求到货时间",
|
|
|
+ trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
- goodtype: [
|
|
|
+
|
|
|
+ use_desc: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请选择商品类型",
|
|
|
- trigger: "change",
|
|
|
+ message: "项目用途不能为空",
|
|
|
+ trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
- sale_fee: [
|
|
|
+ ladder: [
|
|
|
{
|
|
|
+ type: "array",
|
|
|
required: true,
|
|
|
- message: "请输入商品单价",
|
|
|
- trigger: "blur",
|
|
|
+ message: "至少添加两个商品要求",
|
|
|
+ trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- watch: {
|
|
|
- showModel: function (val) {
|
|
|
- this.showModelThis = val;
|
|
|
- if (val) {
|
|
|
- this.initForm();
|
|
|
+ mounted() {
|
|
|
+ this.initForm();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //平台选择
|
|
|
+ platform_codesearchChange(e) {
|
|
|
+ if (e) {
|
|
|
+ const { id, code, label } = e;
|
|
|
+ this.parmValue.platform = id ? [id] : [];
|
|
|
+ this.$refs.ruleForm.validateField("platform");
|
|
|
}
|
|
|
},
|
|
|
- showModelThis(val) {
|
|
|
- if (!val) {
|
|
|
- this.$emit("cancel");
|
|
|
+ //销售方公司选择
|
|
|
+ company_idsearchChange(e) {
|
|
|
+ console.log(e);
|
|
|
+
|
|
|
+ if (e) {
|
|
|
+ const { id, code, label } = e;
|
|
|
+ this.ruleForm.companyNo = code || "";
|
|
|
}
|
|
|
+ this.$refs.ruleForm.validateField("companyNo");
|
|
|
},
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ //购买方公司选择
|
|
|
customerChange(e) {
|
|
|
if (e && e.id) {
|
|
|
- this.ruleForm.customer_code = [e.code];
|
|
|
+ this.ruleForm.khNo = [e.code];
|
|
|
this.ruleForm.customer_name = e.label;
|
|
|
} else {
|
|
|
- this.ruleForm.customer_code = [];
|
|
|
+ this.ruleForm.khNo = [];
|
|
|
this.ruleForm.customer_name = "";
|
|
|
}
|
|
|
|
|
|
- this.$refs.ruleForm.validateField("customer_code");
|
|
|
+ this.$refs.ruleForm.validateField("khNo");
|
|
|
},
|
|
|
- async supplierChange(e) {
|
|
|
- if (e && e.id) {
|
|
|
- this.ruleForm.supplierNo = [e.code];
|
|
|
- } else {
|
|
|
- this.ruleForm.supplierNo = [];
|
|
|
- }
|
|
|
- this.$refs.ruleForm.validateField("supplierNo");
|
|
|
+ budget_total_change(e) {
|
|
|
+ this.ruleForm.budget_total = e + "";
|
|
|
+ this.$refs.ruleForm.validateField("budget_total");
|
|
|
+ },
|
|
|
+ openCostEdit(index, sitem) {
|
|
|
+ this.costmodelIndex = index;
|
|
|
+ this.costsitem = sitem;
|
|
|
+ this.costshowModel = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ openCostEditDelete(index) {
|
|
|
+ this.tableData.splice(index, 1);
|
|
|
},
|
|
|
showAddrAddEditModalRefresh(e) {
|
|
|
const { index, item } = e;
|
|
@@ -442,19 +369,17 @@ export default {
|
|
|
if (this.$refs.ruleForm) {
|
|
|
this.$refs.ruleForm.resetFields();
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
- const { zxNo, class_cat, khname, khNo, cpName, sale_fee } =
|
|
|
- this.sitem;
|
|
|
+ // const { zxNo, class_cat, khname, khNo, cpName, budget_total } =
|
|
|
+ // this.sitem;
|
|
|
this.ruleForm = {
|
|
|
- zxNo: zxNo || "",
|
|
|
- customer_code: khNo ? [khNo] : [],
|
|
|
- customer_name: khname || "",
|
|
|
- class_cat: class_cat || "",
|
|
|
- goods_name: cpName || "",
|
|
|
- supplierNo: [],
|
|
|
- sendtype: "1", // 真实姓名
|
|
|
- good_num: "",
|
|
|
- sale_fee: sale_fee || "",
|
|
|
- goodtype: "1",
|
|
|
+ name: "",
|
|
|
+ platform: [],
|
|
|
+ companyNo: "",
|
|
|
+ khNo: [],
|
|
|
+ budget_total: "",
|
|
|
+ arrtime: "",
|
|
|
+ use_desc: "",
|
|
|
+ ladder: [],
|
|
|
};
|
|
|
}
|
|
|
});
|
|
@@ -518,14 +443,8 @@ export default {
|
|
|
await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
|
- const {
|
|
|
- zxNo,
|
|
|
- customer_code,
|
|
|
- good_num,
|
|
|
- sendtype,
|
|
|
- supplierNo,
|
|
|
- goodtype,
|
|
|
- } = JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
+ const { zxNo, khNo, good_num, sendtype, companyNo, goodtype } =
|
|
|
+ JSON.parse(JSON.stringify(this.ruleForm));
|
|
|
const { addrlist } = JSON.parse(JSON.stringify(this.addrForm));
|
|
|
if (sendtype === "1") {
|
|
|
let isok = true,
|
|
@@ -551,9 +470,9 @@ export default {
|
|
|
}
|
|
|
const model = {
|
|
|
zxNo: zxNo || "",
|
|
|
- customer_code: customer_code.length === 1 ? customer_code[0] : "",
|
|
|
+ khNo: khNo.length === 1 ? khNo[0] : "",
|
|
|
good_num: good_num || "",
|
|
|
- supplierNo: supplierNo.length > 0 ? supplierNo[0] : "",
|
|
|
+ companyNo: companyNo.length > 0 ? companyNo[0] : "",
|
|
|
sendtype: sendtype | "",
|
|
|
goodtype: goodtype || "",
|
|
|
addrlist: [],
|