|
@@ -16,11 +16,11 @@
|
|
|
<el-form-item label="销售方" prop="supplierNo">
|
|
|
<search-work-company
|
|
|
:type="'1'"
|
|
|
- :value="ruleForm.supplierNo"
|
|
|
:size="'mini'"
|
|
|
- :placeholder="'销售方公司'"
|
|
|
:disabled="true"
|
|
|
:isDetail="false"
|
|
|
+ :placeholder="'销售方公司'"
|
|
|
+ :value="ruleForm.supplierNo"
|
|
|
@searchChange="supplierChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -53,11 +53,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="平台订单号" prop="platform_order">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.platform_order"
|
|
|
- placeholder="如:PO号"
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
+ <el-input v-model="ruleForm.platform_order" placeholder="如:PO号" maxlength="100" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -70,18 +66,13 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
:picker-options="pickerOptions"
|
|
|
placeholder="承诺回款时间"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="其他单号" prop="workNo">
|
|
|
- <el-input
|
|
|
- v-model="ruleForm.workNo"
|
|
|
- placeholder="如:业管单号"
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
+ <el-input v-model="ruleForm.workNo" placeholder="如:业管单号" maxlength="100" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -112,12 +103,12 @@
|
|
|
class="fl"
|
|
|
v-if="goods_sitem.good_thumb_img"
|
|
|
:src="goods_sitem.good_thumb_img"
|
|
|
- alt=""
|
|
|
+ alt
|
|
|
/>
|
|
|
<span>{{ goods_sitem.good_name }}</span>
|
|
|
<span v-for="(si, i) in goods_sitem.specinfo" :key="si.spec_id + i">
|
|
|
- <span>{{ i === 0 ? "--" : "__" }}</span
|
|
|
- ><span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
|
|
|
+ <span>{{ i === 0 ? "--" : "__" }}</span>
|
|
|
+ <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="good_info_img">
|
|
@@ -131,39 +122,42 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="cat">
|
|
|
- <span v-for="(si, sii) in goods_sitem.cat_info" :key="si.id"
|
|
|
- ><span v-if="sii !== 0">_</span><span>{{ si.name }}</span>
|
|
|
+ <span v-for="(si, sii) in goods_sitem.cat_info" :key="si.id">
|
|
|
+ <span v-if="sii !== 0">_</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="exclusive">
|
|
|
- <span v-for="(si, sii) in goods_sitem.exclusive" :key="si.id"
|
|
|
- ><span v-if="sii !== 0">/</span><span>{{ si.name }}</span>
|
|
|
+ <span v-for="(si, sii) in goods_sitem.exclusive" :key="si.id">
|
|
|
+ <span v-if="sii !== 0">/</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="is_stock">
|
|
|
- <el-tag :size="'mini'">{{
|
|
|
+ <el-tag :size="'mini'">
|
|
|
+ {{
|
|
|
goods_sitem.is_stock + "" === "1" ? "是" : "否"
|
|
|
- }}</el-tag>
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
<template slot="weight">
|
|
|
- <span
|
|
|
- >商品总重:{{ goods_sitem.new_weight }}/{{
|
|
|
- goods_sitem.weight_unit
|
|
|
- }}</span
|
|
|
- >
|
|
|
- <span v-if="goods_sitem.metal_id"
|
|
|
- >--{{
|
|
|
- goods_sitem.noble_weight ? goods_sitem.noble_weight : "0"
|
|
|
+ <span>
|
|
|
+ 商品总重:{{ goods_sitem.new_weight }}/{{
|
|
|
+ goods_sitem.weight_unit
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span v-if="goods_sitem.metal_id">
|
|
|
+ --{{
|
|
|
+ goods_sitem.noble_weight ? goods_sitem.noble_weight : "0"
|
|
|
}}g--{{ goods_sitem.metal_name }}---{{
|
|
|
- goods_sitem.gold_price ? goods_sitem.gold_price : "0"
|
|
|
+ goods_sitem.gold_price ? goods_sitem.gold_price : "0"
|
|
|
}}元/g--{{
|
|
|
- goods_sitem.is_gold_price + "" === "0" ? "不" : ""
|
|
|
+ goods_sitem.is_gold_price + "" === "0" ? "不" : ""
|
|
|
}}启用实时金价--{{
|
|
|
- goods_sitem.is_diff + "" === "1" ? "有" : "无"
|
|
|
+ goods_sitem.is_diff + "" === "1" ? "有" : "无"
|
|
|
}}工差--{{ goods_sitem.config }}---{{
|
|
|
- goods_sitem.other_config
|
|
|
- }}</span
|
|
|
- >
|
|
|
+ goods_sitem.other_config }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
</el-form-item>
|
|
@@ -185,12 +179,7 @@
|
|
|
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="凭证文件" prop="proof_id">
|
|
|
- <el-tooltip
|
|
|
- effect="dark"
|
|
|
- content="查找历史凭证"
|
|
|
- placement="top"
|
|
|
- class="fr"
|
|
|
- >
|
|
|
+ <el-tooltip effect="dark" content="查找历史凭证" placement="top" class="fr">
|
|
|
<i class="el-icon-search tb-icon" @click="showVoucherFun"></i>
|
|
|
</el-tooltip>
|
|
|
|
|
@@ -222,8 +211,7 @@
|
|
|
|
|
|
<video width="250" controls class="fl">
|
|
|
<source :src="ruleForm.proof_url" type="video/mp4" />
|
|
|
- <source :src="ruleForm.proof_url" type="video/avi" />
|
|
|
- 您的浏览器不支持Video标签。
|
|
|
+ <source :src="ruleForm.proof_url" type="video/avi" />您的浏览器不支持Video标签。
|
|
|
</video>
|
|
|
</div>
|
|
|
<div v-else-if="ruleForm.proof_type === '2'" class="clearfix">
|
|
@@ -248,22 +236,19 @@
|
|
|
disabled
|
|
|
maxlength="200"
|
|
|
placeholder="剩余库存"
|
|
|
- /> </el-form-item
|
|
|
- ></el-col>
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item
|
|
|
- label="系统最低售价"
|
|
|
- prop="good_price"
|
|
|
- label-width="110px"
|
|
|
- >
|
|
|
+ <el-form-item label="系统最低售价" prop="good_price" label-width="110px">
|
|
|
<el-input
|
|
|
v-model="ruleForm.good_price"
|
|
|
disabled
|
|
|
maxlength="20"
|
|
|
v-loading="priceLoding"
|
|
|
>
|
|
|
- <template slot="append">元</template></el-input
|
|
|
- >
|
|
|
+ <template slot="append">元</template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -321,25 +306,19 @@
|
|
|
value-format="yyyy-MM-dd"
|
|
|
:picker-options="pickerOptions"
|
|
|
placeholder="要求到货时间"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="下单方式" prop="sendtype">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.sendtype"
|
|
|
- placeholder="下单方式"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-select v-model="ruleForm.sendtype" placeholder="下单方式" style="width: 100%">
|
|
|
<el-option
|
|
|
v-for="item in sendtype_options"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -353,8 +332,7 @@
|
|
|
:rows="ruleForm.good_code ? 4 : 2"
|
|
|
placeholder="订单备注"
|
|
|
v-model="ruleForm.remark"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -412,12 +390,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column
|
|
|
- prop="contactor"
|
|
|
- label="收件联系人"
|
|
|
- min-width="110"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column prop="contactor" label="收件联系人" min-width="110" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
v-if="scope.row.edit"
|
|
@@ -437,12 +410,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column
|
|
|
- prop="mobile"
|
|
|
- label="收货联系电话"
|
|
|
- min-width="130"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column prop="mobile" label="收货联系电话" min-width="130" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
v-if="scope.row.edit"
|
|
@@ -462,12 +430,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column
|
|
|
- prop="addr_code"
|
|
|
- label="收货省市区"
|
|
|
- min-width="230"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column prop="addr_code" label="收货省市区" min-width="230" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
v-if="scope.row.edit"
|
|
@@ -476,26 +439,21 @@
|
|
|
:size="'mini'"
|
|
|
:style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
|
|
|
>
|
|
|
- <search-area
|
|
|
+ <search-area
|
|
|
:value="scope.row.code"
|
|
|
- size="mini"
|
|
|
+ size="mini"
|
|
|
:disabled="!scope.row.edit"
|
|
|
:is-detail="scope.row.edit"
|
|
|
:names="scope.row.names"
|
|
|
- placeholder="收货省市区"
|
|
|
- :level="3"
|
|
|
+ placeholder="收货省市区"
|
|
|
+ :level="3"
|
|
|
@searchChange="areaChange($event,scope.$index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<span v-if="!scope.row.edit">{{ scope.row.addr_code_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="addr"
|
|
|
- label="详细地址"
|
|
|
- min-width="170"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
+ <el-table-column prop="addr" label="详细地址" min-width="170" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
v-if="scope.row.edit"
|
|
@@ -551,36 +509,17 @@
|
|
|
placement="top"
|
|
|
>
|
|
|
<a class="downloadAddr" href="./static/收货地址模板.xlsx">
|
|
|
- <i
|
|
|
- class="el-icon-download tb-icon"
|
|
|
- style="color: #6954f0; margin: 0"
|
|
|
- ></i>
|
|
|
+ <i class="el-icon-download tb-icon" style="color: #6954f0; margin: 0"></i>
|
|
|
</a>
|
|
|
</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 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-tooltip
|
|
|
- effect="dark"
|
|
|
- content="保存"
|
|
|
- v-if="scope.row.edit"
|
|
|
- placement="top"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="el-icon-circle-check tb-icon"
|
|
|
- @click="checkRow(scope.$index)"
|
|
|
- ></i>
|
|
|
+ <el-tooltip effect="dark" content="保存" v-if="scope.row.edit" placement="top">
|
|
|
+ <i class="el-icon-circle-check tb-icon" @click="checkRow(scope.$index)"></i>
|
|
|
</el-tooltip>
|
|
|
|
|
|
<el-tooltip effect="dark" content="删除" placement="top">
|
|
@@ -595,11 +534,7 @@
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <in-addr-model
|
|
|
- :show-model="addrmodel"
|
|
|
- @cancel="addrmodel = false"
|
|
|
- @refresh="addrRefresh"
|
|
|
- />
|
|
|
+ <in-addr-model :show-model="addrmodel" @cancel="addrmodel = false" @refresh="addrRefresh" />
|
|
|
|
|
|
<show-voucher-model
|
|
|
:showModel="showVoucher"
|
|
@@ -620,15 +555,15 @@
|
|
|
<p>
|
|
|
订单总金额:
|
|
|
{{
|
|
|
- priceAccMul(
|
|
|
- ruleForm && ruleForm.good_num ? ruleForm.good_num : "0",
|
|
|
- ruleForm && ruleForm.new_good_price
|
|
|
- ? ruleForm && ruleForm.new_good_price
|
|
|
- : "0"
|
|
|
- )
|
|
|
+ priceAccMul(
|
|
|
+ ruleForm && ruleForm.good_num ? ruleForm.good_num : "0",
|
|
|
+ ruleForm && ruleForm.new_good_price
|
|
|
+ ? ruleForm && ruleForm.new_good_price
|
|
|
+ : "0"
|
|
|
+ )
|
|
|
}}
|
|
|
</p>
|
|
|
- <el-button :size="'mini'" type="primary" @click="submitForm">保 存 </el-button>
|
|
|
+ <el-button :size="'mini'" type="primary" @click="submitForm">保 存</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -644,7 +579,7 @@ import {
|
|
|
isEmoticon,
|
|
|
isSpecialSymbol,
|
|
|
hasSpace,
|
|
|
- isAddr,
|
|
|
+ isAddr
|
|
|
} from "@/utils/validate";
|
|
|
import inAddrModel from "@/components/in-addr-model";
|
|
|
import showVoucherModel from "@/components/show-voucher-model";
|
|
@@ -660,29 +595,29 @@ export default {
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
|
props: ["newTime", "id", "sitem", "type"],
|
|
|
computed: {
|
|
|
- ...mapGetters(["business_companyNo"]),
|
|
|
+ ...mapGetters(["business_companyNo"])
|
|
|
},
|
|
|
components: {
|
|
|
inAddrModel,
|
|
|
showVoucherModel,
|
|
|
- searchGoodOnlineModal,
|
|
|
+ searchGoodOnlineModal
|
|
|
},
|
|
|
watch: {
|
|
|
- newTime: function (val) {
|
|
|
+ newTime: function(val) {
|
|
|
if (val) {
|
|
|
this.initForm();
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
powers() {
|
|
|
const tran =
|
|
|
this.$store.getters.btnList.find(
|
|
|
- (item) => item.menu_route == "salesOrderDetail"
|
|
|
+ item => item.menu_route == "salesOrderDetail"
|
|
|
) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
data() {
|
|
@@ -753,7 +688,7 @@ export default {
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
return time.getTime() < Date.now() - 1000 * 60 * 60 * 24;
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
goodtype_options: [
|
|
|
{
|
|
@@ -762,33 +697,33 @@ export default {
|
|
|
children: [
|
|
|
{
|
|
|
value: "1",
|
|
|
- label: "常规商品",
|
|
|
+ label: "常规商品"
|
|
|
},
|
|
|
{
|
|
|
value: "2",
|
|
|
- label: "赠品",
|
|
|
+ label: "赠品"
|
|
|
},
|
|
|
{
|
|
|
value: "3",
|
|
|
- label: "样品",
|
|
|
- },
|
|
|
- ],
|
|
|
+ label: "样品"
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
value: "is_activity_1",
|
|
|
label: "参与活动",
|
|
|
- children: [],
|
|
|
- },
|
|
|
+ children: []
|
|
|
+ }
|
|
|
],
|
|
|
sendtype_options: [
|
|
|
{
|
|
|
value: "1",
|
|
|
- label: "有地址下单",
|
|
|
+ label: "有地址下单"
|
|
|
},
|
|
|
{
|
|
|
value: "2",
|
|
|
- label: "无地址下单",
|
|
|
- },
|
|
|
+ label: "无地址下单"
|
|
|
+ }
|
|
|
],
|
|
|
ruleForm: {
|
|
|
order_type: "1",
|
|
@@ -810,7 +745,7 @@ export default {
|
|
|
workNo: "", //其他单号
|
|
|
sendtype: "1", //发货方式
|
|
|
remark: "", //备注
|
|
|
- good_code: "", // 商品编号
|
|
|
+ good_code: "" // 商品编号
|
|
|
},
|
|
|
rulesThis: this.rules,
|
|
|
rules: {
|
|
@@ -818,44 +753,44 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择销售方公司",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
customer_code: [
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
message: "请选择企业客户",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
platform_id: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择所属平台",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
arrtime: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "要求到货时间",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
new_good_price: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "销售单价不能为空!",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
proof_id: [
|
|
|
{
|
|
|
required: false,
|
|
|
message: "请选择凭证文件",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
|
|
|
goodtype: [
|
|
@@ -863,40 +798,40 @@ export default {
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
message: "请选择活动类型",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
good_num: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择活动类型",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
sendtype: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择发货方式",
|
|
|
- trigger: "change",
|
|
|
- },
|
|
|
+ trigger: "change"
|
|
|
+ }
|
|
|
],
|
|
|
good_code: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择销售商品",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
remark: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "备注不能为空",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
addrForm: {
|
|
|
- order_addr: [], //收货地址
|
|
|
+ order_addr: [] //收货地址
|
|
|
},
|
|
|
delAddrList: [],
|
|
|
delStockList: [],
|
|
@@ -904,30 +839,30 @@ export default {
|
|
|
receipt_quantity: {
|
|
|
required: true,
|
|
|
validator: validateWeight,
|
|
|
- trigger: "blur",
|
|
|
+ trigger: "blur"
|
|
|
},
|
|
|
|
|
|
contactor: {
|
|
|
required: true,
|
|
|
trigger: "blur",
|
|
|
- validator: validatecontactor,
|
|
|
+ validator: validatecontactor
|
|
|
},
|
|
|
mobile: {
|
|
|
required: true,
|
|
|
validator: validatemobile,
|
|
|
- trigger: "blur",
|
|
|
+ trigger: "blur"
|
|
|
},
|
|
|
|
|
|
order_addr: {
|
|
|
type: "array",
|
|
|
required: false,
|
|
|
- trigger: "change",
|
|
|
+ trigger: "change"
|
|
|
},
|
|
|
addr: {
|
|
|
required: true,
|
|
|
validator: validateAddr,
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
loading: false,
|
|
@@ -936,9 +871,9 @@ export default {
|
|
|
goods_sitem: {},
|
|
|
order_good_num: {
|
|
|
ogood_type: "",
|
|
|
- ogood_num: "0",
|
|
|
+ ogood_num: "0"
|
|
|
},
|
|
|
- priceLoding: false,
|
|
|
+ priceLoding: false
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -985,7 +920,7 @@ export default {
|
|
|
workNo: "", //其他单号
|
|
|
sendtype: "1", //发货方式
|
|
|
remark: "", //备注
|
|
|
- good_code: "", // 商品编号
|
|
|
+ good_code: "" // 商品编号
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -994,12 +929,12 @@ export default {
|
|
|
this.$refs.addrForm.clearValidate();
|
|
|
const { addrs } = this.sitem;
|
|
|
this.addrForm = {
|
|
|
- order_addr: [],
|
|
|
+ order_addr: []
|
|
|
};
|
|
|
this.delAddrList = [];
|
|
|
|
|
|
if (addrs && addrs.length > 0) {
|
|
|
- addrs.forEach((v) => {
|
|
|
+ addrs.forEach(v => {
|
|
|
const { area_code, city_code, provice_code } = v.addr_code;
|
|
|
let model = {
|
|
|
edit: false,
|
|
@@ -1012,7 +947,7 @@ export default {
|
|
|
: [],
|
|
|
addr: v.addr || "",
|
|
|
id: v.id,
|
|
|
- is_del: 0,
|
|
|
+ is_del: 0
|
|
|
};
|
|
|
this.delAddrList.push(model);
|
|
|
this.addrForm.order_addr.push(model);
|
|
@@ -1038,10 +973,10 @@ export default {
|
|
|
addrRefresh(e) {
|
|
|
const list = JSON.parse(JSON.stringify(e.list));
|
|
|
list.forEach(item => {
|
|
|
- item.code = item.areaCode ? [item.areaCode] :[]
|
|
|
- item.names = item.label ? [item.label] : []
|
|
|
- })
|
|
|
- console.log(list)
|
|
|
+ item.code = item.areaCode ? [item.areaCode] : [];
|
|
|
+ item.names = item.label ? [item.label] : [];
|
|
|
+ });
|
|
|
+ console.log(list);
|
|
|
this.addrForm.order_addr.push(...list);
|
|
|
},
|
|
|
async resultList(e) {
|
|
@@ -1068,21 +1003,22 @@ export default {
|
|
|
let model = {
|
|
|
skuCode: good_code,
|
|
|
companyNo: supplierNo,
|
|
|
- platform_id,
|
|
|
+ platform_id
|
|
|
};
|
|
|
const { code, data, message } = await asyncRequest.goods_active(model);
|
|
|
if (code === 0) {
|
|
|
const { act, good } = data;
|
|
|
let actlist = act.length > 0 ? JSON.parse(JSON.stringify(act)) : [];
|
|
|
- actlist.forEach((a) => {
|
|
|
+ actlist.forEach(a => {
|
|
|
a.value = a.activity_code;
|
|
|
a.label = a.activity_name;
|
|
|
});
|
|
|
this.goodtype_options[1].children = [];
|
|
|
this.goodtype_options[1].children.push(...actlist);
|
|
|
- let goodItem = good.length > 0 ? JSON.parse(JSON.stringify(good[0])) : {};
|
|
|
+ let goodItem =
|
|
|
+ good.length > 0 ? JSON.parse(JSON.stringify(good[0])) : {};
|
|
|
if (goodItem.good_name) {
|
|
|
- this.goodtype_options[0].children.map((b) => {
|
|
|
+ this.goodtype_options[0].children.map(b => {
|
|
|
b.activity_stock = goodItem ? goodItem.stock_num + "" : "0";
|
|
|
return b;
|
|
|
});
|
|
@@ -1096,12 +1032,14 @@ export default {
|
|
|
},
|
|
|
async get_goods_detail(skuCode) {
|
|
|
let { code, data, message } = await asyncRequest.goods_detail({
|
|
|
- skuCode: skuCode,
|
|
|
+ skuCode: skuCode
|
|
|
});
|
|
|
if (code === 0) {
|
|
|
this.goods_sitem = data;
|
|
|
// console.log("1111111111111111", this.goods_sitem);
|
|
|
- this.goods_sitem.good_info_img = this.goods_sitem.good_info_img.split(",");
|
|
|
+ this.goods_sitem.good_info_img = this.goods_sitem.good_info_img.split(
|
|
|
+ ","
|
|
|
+ );
|
|
|
const { weight } = this.goods_sitem;
|
|
|
let kgnum = parseInt((weight * 1) / 1000);
|
|
|
let gnum = (weight * 1) % 1000;
|
|
@@ -1181,16 +1119,16 @@ export default {
|
|
|
if (oldGood_type === ogood_type && good_num === ogood_num) {
|
|
|
this.order_good_num = {
|
|
|
ogood_type: goodtype.length === 2 ? goodtype[1] : "",
|
|
|
- ogood_num: this.ruleForm.good_num,
|
|
|
+ ogood_num: this.ruleForm.good_num
|
|
|
};
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//activity_stock
|
|
|
if (goodtype.length === 2) {
|
|
|
- this.goodtype_options.forEach((a) => {
|
|
|
+ this.goodtype_options.forEach(a => {
|
|
|
if (a.children && a.children.length) {
|
|
|
- a.children.forEach((b) => {
|
|
|
+ a.children.forEach(b => {
|
|
|
if (b.value === goodtype[1]) {
|
|
|
console.log(b.activity_stock);
|
|
|
this.ruleForm.activity_stock = b.activity_stock || "0";
|
|
@@ -1208,7 +1146,7 @@ export default {
|
|
|
|
|
|
this.order_good_num = {
|
|
|
ogood_type: goodtype.length === 2 ? goodtype[1] : "",
|
|
|
- ogood_num: this.ruleForm.good_num,
|
|
|
+ ogood_num: this.ruleForm.good_num
|
|
|
};
|
|
|
},
|
|
|
change_good_code() {
|
|
@@ -1223,7 +1161,7 @@ export default {
|
|
|
}
|
|
|
this.addshowModel = {
|
|
|
company_id: supplierNo,
|
|
|
- platform_code: platform_id,
|
|
|
+ platform_code: platform_id
|
|
|
};
|
|
|
this.showModel = true;
|
|
|
},
|
|
@@ -1254,7 +1192,7 @@ export default {
|
|
|
this.goods_sitem = {};
|
|
|
},
|
|
|
openHouseModal(index) {
|
|
|
- let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
|
|
|
+ let findex = this.addrForm.order_addr.findIndex(v => v.edit === true);
|
|
|
if (findex !== -1) {
|
|
|
this.$message.warning("当前已有地址在编辑,请保存后再试!");
|
|
|
return;
|
|
@@ -1266,7 +1204,7 @@ export default {
|
|
|
contactor: "",
|
|
|
mobile: "",
|
|
|
addr_code: [],
|
|
|
- addr: "",
|
|
|
+ addr: ""
|
|
|
});
|
|
|
} else {
|
|
|
this.addrForm.order_addr[index].edit = true;
|
|
@@ -1277,26 +1215,27 @@ export default {
|
|
|
select_area_change(e, index) {
|
|
|
this.addrForm.order_addr[index].addr_code = e;
|
|
|
},
|
|
|
- areaChange(e,index){
|
|
|
- const { code,area_code,label } = e
|
|
|
+ areaChange(e, index) {
|
|
|
+ const { code, area_code, label } = e;
|
|
|
this.addrForm.order_addr[index].names = label ? [label] : [];
|
|
|
this.addrForm.order_addr[index].code = area_code ? [area_code] : [];
|
|
|
- this.addrForm.order_addr[index].addr_code = code ? code.split(',') : [];
|
|
|
+ this.addrForm.order_addr[index].addr_code = code ? code.split(",") : [];
|
|
|
},
|
|
|
//省市区保存某一行
|
|
|
async checkRow(rowIndex) {
|
|
|
- await this.$refs.addrForm.validate(async (valid) => {
|
|
|
+ await this.$refs.addrForm.validate(async valid => {
|
|
|
if (valid) {
|
|
|
const { addr_code } = this.addrForm.order_addr[rowIndex];
|
|
|
if (addr_code && addr_code.length === 3) {
|
|
|
let arrCode = addr_code[addr_code.length - 1];
|
|
|
// console.log(model);
|
|
|
let { code, data, message } = await asyncRequest.addrall({
|
|
|
- code: arrCode,
|
|
|
+ code: arrCode
|
|
|
});
|
|
|
if (code === 0) {
|
|
|
const { province, city, area } = data;
|
|
|
- let province_name = province && province.name ? province.name : "";
|
|
|
+ let province_name =
|
|
|
+ province && province.name ? province.name : "";
|
|
|
let city_name = city && city.name ? city.name : "";
|
|
|
let area_name = area && area.name ? area.name : "";
|
|
|
this.addrForm.order_addr[rowIndex].addr_code_name =
|
|
@@ -1323,7 +1262,7 @@ export default {
|
|
|
rows.splice(index, 1);
|
|
|
},
|
|
|
async submitForm() {
|
|
|
- await this.$refs.ruleForm.validate(async (valid) => {
|
|
|
+ await this.$refs.ruleForm.validate(async valid => {
|
|
|
if (valid) {
|
|
|
if (this.loading) {
|
|
|
return;
|
|
@@ -1360,7 +1299,7 @@ export default {
|
|
|
let addrT = 0,
|
|
|
isAEdit = false;
|
|
|
|
|
|
- order_addr.forEach((v2) => {
|
|
|
+ order_addr.forEach(v2 => {
|
|
|
if (v2.edit) {
|
|
|
isAEdit = true;
|
|
|
}
|
|
@@ -1370,7 +1309,7 @@ export default {
|
|
|
mobile: v2.mobile,
|
|
|
addr: v2.addr,
|
|
|
receipt_quantity: v2.receipt_quantity,
|
|
|
- addr_code: v2.addr_code,
|
|
|
+ addr_code: v2.addr_code
|
|
|
};
|
|
|
model.addrlist.push(model2);
|
|
|
});
|
|
@@ -1395,7 +1334,7 @@ export default {
|
|
|
model.goodtype = key_0 === "is_activity_1" ? "1" : key_1;
|
|
|
model.act_code = key_0 === "is_activity_1" ? key_1 : "";
|
|
|
|
|
|
- Object.keys(model).forEach((key) => {
|
|
|
+ Object.keys(model).forEach(key => {
|
|
|
if (typeof model[key] === "string") {
|
|
|
model[key] = replaceTextWrapAndSpace(model[key]);
|
|
|
}
|
|
@@ -1406,7 +1345,7 @@ export default {
|
|
|
if (res && res.code === 0) {
|
|
|
this.$notify.success({
|
|
|
title: "订单创建成功!",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
|
|
|
this.$emit("refresh");
|
|
@@ -1426,7 +1365,7 @@ export default {
|
|
|
this.priceLoding = true;
|
|
|
let resModel = {
|
|
|
isok: true,
|
|
|
- price: "0",
|
|
|
+ price: "0"
|
|
|
};
|
|
|
const { good_num, good_code, goodtype } = this.ruleForm;
|
|
|
let key_1 = goodtype[1];
|
|
@@ -1435,7 +1374,7 @@ export default {
|
|
|
skuCode: good_code,
|
|
|
sale_num: good_num,
|
|
|
is_activity: key_0 === "is_activity_0" ? "0" : "1",
|
|
|
- act_code: key_0 === "is_activity_1" ? key_1 : "",
|
|
|
+ act_code: key_0 === "is_activity_1" ? key_1 : ""
|
|
|
};
|
|
|
console.log(model);
|
|
|
let { code, message, data } = await asyncRequest.salegetprice(model);
|
|
@@ -1446,7 +1385,10 @@ export default {
|
|
|
|
|
|
let oldGood_type = goodtype.length === 2 ? goodtype[1] : "";
|
|
|
|
|
|
- if (key_0 === "is_activity_0" && (oldGood_type == 2 || oldGood_type == 3)) {
|
|
|
+ if (
|
|
|
+ key_0 === "is_activity_0" &&
|
|
|
+ (oldGood_type == 2 || oldGood_type == 3)
|
|
|
+ ) {
|
|
|
resModel.price = 0 + "";
|
|
|
}
|
|
|
} else if (code >= 100 && code <= 104) {
|
|
@@ -1457,8 +1399,8 @@ export default {
|
|
|
}
|
|
|
this.priceLoding = false;
|
|
|
return resModel;
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|