|
|
@ -19,7 +19,94 @@ |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@on-load="onLoad" |
|
|
|
@on-load="onLoad" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<template slot-scope="scope" slot="productIdForm"> |
|
|
|
|
|
|
|
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm"> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
|
|
style="margin: 0 0 15px 0" |
|
|
|
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:prop="'domains.' + index + '.productId'" |
|
|
|
|
|
|
|
:rules="{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: '请选择商品', |
|
|
|
|
|
|
|
trigger: 'change', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="domain.productId" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
@change="handleProduct" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in productIdArr" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template slot-scope="scope" slot="productSpecsIdForm"> |
|
|
|
|
|
|
|
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm"> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
|
|
style="margin: 0 0 15px 0" |
|
|
|
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
|
|
v-model="domain.productSpecsId" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in productSpecsIdArr" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<template slot-scope="scope" slot="itemnumForm"> |
|
|
|
|
|
|
|
<el-form |
|
|
|
|
|
|
|
v-for="(domain, index) in dynamicValidateForm.domains" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
style="display: flex" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
|
|
style="margin: 0 0 15px 0" |
|
|
|
|
|
|
|
:rules="{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: '商品数量不能为空', |
|
|
|
|
|
|
|
trigger: 'blur', |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
|
|
v-model="domain.itemnum" |
|
|
|
|
|
|
|
placeholder="数量" |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="number" |
|
|
|
|
|
|
|
min="1" |
|
|
|
|
|
|
|
></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<div v-if="index > 0"> |
|
|
|
|
|
|
|
<el-button @click.prevent="removeDomain(domain)">删除</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
|
|
|
<el-button @click.prevent="addDomain(domain)">新增</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template slot-scope="scope" slot="menu"> |
|
|
|
<template slot-scope="scope" slot="menu"> |
|
|
|
|
|
|
|
<el-button @click="handleView(scope.row)" type="text" size="mini" |
|
|
|
|
|
|
|
><span class="el-icon-view"></span> 查看</el-button |
|
|
|
|
|
|
|
> |
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
@click="handleShiporder(scope.row)" |
|
|
|
@click="handleShiporder(scope.row)" |
|
|
|
type="text" |
|
|
|
type="text" |
|
|
@ -36,6 +123,7 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
<!-- 发货单 --> |
|
|
|
<el-dialog |
|
|
|
<el-dialog |
|
|
|
title="发货单" |
|
|
|
title="发货单" |
|
|
|
v-dialogDrag |
|
|
|
v-dialogDrag |
|
|
@ -241,7 +329,7 @@ |
|
|
|
v-for="(item, index) in basicpackge" |
|
|
|
v-for="(item, index) in basicpackge" |
|
|
|
:label="item.name" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id" |
|
|
|
:value="item.id" |
|
|
|
:key="item.id" |
|
|
|
:key="index" |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -259,6 +347,7 @@ |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 物流信息 --> |
|
|
|
<el-dialog |
|
|
|
<el-dialog |
|
|
|
title="物流信息" |
|
|
|
title="物流信息" |
|
|
|
v-dialogDrag |
|
|
|
v-dialogDrag |
|
|
@ -279,6 +368,111 @@ |
|
|
|
</el-timeline-item> |
|
|
|
</el-timeline-item> |
|
|
|
</el-timeline> |
|
|
|
</el-timeline> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 查看 --> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
|
|
|
title="查看" |
|
|
|
|
|
|
|
v-dialogDrag |
|
|
|
|
|
|
|
:visible.sync="viewVisiable" |
|
|
|
|
|
|
|
class="avue-dialog avue-dialog--top" |
|
|
|
|
|
|
|
append-to-body |
|
|
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
|
|
:before-close="handleViewClose" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-form ref="form" :model="form" label-width="120px"> |
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
|
|
<el-card class="box-card" shadow="never"> |
|
|
|
|
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
|
|
|
|
<span>订单信息</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="订单编号:"> |
|
|
|
|
|
|
|
<span>{{ form.id }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="下单用户:"> |
|
|
|
|
|
|
|
<span>{{ form.shippingName }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="是否需要发货:"> |
|
|
|
|
|
|
|
<span v-if="form.isDelivery == 1">不需要</span> |
|
|
|
|
|
|
|
<span v-if="form.isDelivery == 2">需要发货</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="订单状态:"> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 0">已取消</span> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 2">待付款</span> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 3">待发货</span> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 4">待收货</span> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 5">已完成</span> |
|
|
|
|
|
|
|
<span v-if="form.orderStatus == 6">退款售后</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="订单金额:"> |
|
|
|
|
|
|
|
<span>{{ form.price }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="支付方式:"> |
|
|
|
|
|
|
|
<span v-if="form.payment == 1">微信</span> |
|
|
|
|
|
|
|
<span v-if="form.payment == 2">支付宝</span> |
|
|
|
|
|
|
|
<span v-if="form.payment == 3">现金</span> |
|
|
|
|
|
|
|
<span v-if="form.payment == 4">货到付款</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="收货人手机号:"> |
|
|
|
|
|
|
|
<span>{{ form.consigneePhone }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-row :gutter="24"> |
|
|
|
|
|
|
|
<el-card |
|
|
|
|
|
|
|
class="box-card" |
|
|
|
|
|
|
|
shadow="never" |
|
|
|
|
|
|
|
v-for="(item, index) in form.ordersDetailsList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div slot="header" class="clearfix" v-if="index < 1"> |
|
|
|
|
|
|
|
<span>商品信息</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="商品名称:"> |
|
|
|
|
|
|
|
<span>{{ item.productName }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="商品单价:"> |
|
|
|
|
|
|
|
<span>{{ item.productSpecsPrice }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="购买数量:"> |
|
|
|
|
|
|
|
<span>{{ item.itemnum }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="商品规格名称:"> |
|
|
|
|
|
|
|
<span>{{ item.productSpecsName }}</span> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
<el-form-item label="商品图片:"> |
|
|
|
|
|
|
|
<el-image |
|
|
|
|
|
|
|
style="width: 80px; height: 80px" |
|
|
|
|
|
|
|
:fit="contain" |
|
|
|
|
|
|
|
:src="item.productThumb" |
|
|
|
|
|
|
|
></el-image> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</basic-container> |
|
|
|
</basic-container> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -295,11 +489,22 @@ import { |
|
|
|
interfaceType, |
|
|
|
interfaceType, |
|
|
|
dataplan, |
|
|
|
dataplan, |
|
|
|
getParcel, |
|
|
|
getParcel, |
|
|
|
|
|
|
|
productfillData, |
|
|
|
|
|
|
|
productspecsfillData, |
|
|
|
} from "@/api/ordermanage/mallorders"; |
|
|
|
} from "@/api/ordermanage/mallorders"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
form: {}, |
|
|
|
form: {}, |
|
|
|
|
|
|
|
dynamicValidateForm: { |
|
|
|
|
|
|
|
domains: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
productId: "", |
|
|
|
|
|
|
|
productSpecsId: "", |
|
|
|
|
|
|
|
itemnum: "", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
query: {}, |
|
|
|
query: {}, |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
page: { |
|
|
|
page: { |
|
|
@ -317,19 +522,19 @@ export default { |
|
|
|
searchMenuSpan: 6, |
|
|
|
searchMenuSpan: 6, |
|
|
|
border: true, |
|
|
|
border: true, |
|
|
|
index: true, |
|
|
|
index: true, |
|
|
|
viewBtn: true, |
|
|
|
viewBtn: false, |
|
|
|
columnBtn: true, |
|
|
|
columnBtn: true, |
|
|
|
addBtn: true, |
|
|
|
addBtn: true, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogClickModal: false, |
|
|
|
dialogWidth: "45%", |
|
|
|
dialogWidth: "65%", |
|
|
|
labelWidth: 110, |
|
|
|
labelWidth: 130, |
|
|
|
// searchLabelWidth: 100, |
|
|
|
|
|
|
|
column: [ |
|
|
|
column: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "订单编号", |
|
|
|
label: "订单编号", |
|
|
|
prop: "id", |
|
|
|
prop: "id", |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
addDisplay: false, |
|
|
|
addDisplay: false, |
|
|
|
|
|
|
|
editDisplay: false, |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
@ -339,25 +544,53 @@ export default { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "商品名称", |
|
|
|
label: "下单用户", |
|
|
|
prop: "productName", |
|
|
|
prop: "userId", |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
editDisplay: false, |
|
|
|
type: "select", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "account", |
|
|
|
|
|
|
|
value: "id", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/user/fillData", |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入商品名称", |
|
|
|
message: "请选择下单用户", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "change", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "商品类型", |
|
|
|
label: "发货", |
|
|
|
prop: "productType", |
|
|
|
prop: "isDelivery", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
search: false, |
|
|
|
|
|
|
|
dataType: "number", |
|
|
|
|
|
|
|
dicData: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "不需要", |
|
|
|
|
|
|
|
value: 1, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "需要发货", |
|
|
|
|
|
|
|
value: 2, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
rules: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请选择是否需要发货", |
|
|
|
|
|
|
|
trigger: "change", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "订单状态", |
|
|
|
|
|
|
|
prop: "orderStatus", |
|
|
|
type: "select", |
|
|
|
type: "select", |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
editDisplay: false, |
|
|
|
dicUrl: "/api/iot-system/dict/dictionary?code=order_status", |
|
|
|
dicUrl: "/api/iot-system/dict/dictionary?code=shop_type", |
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
|
label: "dictValue", |
|
|
|
label: "dictValue", |
|
|
|
value: "dictKey", |
|
|
|
value: "dictKey", |
|
|
@ -366,90 +599,160 @@ export default { |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请选择商品类型", |
|
|
|
message: "请选择订单状态", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "change", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "订购数量", |
|
|
|
label: "订单金额", |
|
|
|
prop: "itemnum", |
|
|
|
prop: "price", |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入订购数量", |
|
|
|
message: "请输入订单金额", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "下单用户", |
|
|
|
label: "支付方式", |
|
|
|
prop: "shippingName", |
|
|
|
prop: "payment", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/dict/dictionary?code=payment", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "dictValue", |
|
|
|
|
|
|
|
value: "dictKey", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dataType: "number", |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入下单用户", |
|
|
|
message: "请选择支付方式", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "change", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "是否需要发货", |
|
|
|
label: "收货人手机号", |
|
|
|
prop: "isDelivery", |
|
|
|
prop: "consigneePhone", |
|
|
|
type: "select", |
|
|
|
|
|
|
|
search: false, |
|
|
|
search: false, |
|
|
|
dataType: "number", |
|
|
|
rules: [ |
|
|
|
dicData: [ |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "不需要", |
|
|
|
required: true, |
|
|
|
value: 1, |
|
|
|
message: "请输入收货人手机号", |
|
|
|
|
|
|
|
trigger: "blur", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "需要发货", |
|
|
|
label: "省份", |
|
|
|
value: 2, |
|
|
|
prop: "provence", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "name", |
|
|
|
|
|
|
|
value: "code", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
cascaderItem: ["city", "area"], |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/region/select", |
|
|
|
|
|
|
|
rules: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
required: true, |
|
|
|
|
|
|
|
message: "请选择省份", |
|
|
|
|
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "市", |
|
|
|
|
|
|
|
prop: "city", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "name", |
|
|
|
|
|
|
|
value: "code", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dicFlag: false, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/region/select?code={{key}}", |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请选择是否需要发货", |
|
|
|
message: "请选择市", |
|
|
|
trigger: "change", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "订单状态", |
|
|
|
label: "区", |
|
|
|
prop: "status", |
|
|
|
prop: "area", |
|
|
|
type: "select", |
|
|
|
type: "select", |
|
|
|
search: true, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/dict/dictionary?code=order_status", |
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
|
label: "dictValue", |
|
|
|
label: "name", |
|
|
|
value: "dictKey", |
|
|
|
value: "code", |
|
|
|
}, |
|
|
|
}, |
|
|
|
dataType: "number", |
|
|
|
dicFlag: false, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-system/region/select?code={{key}}", |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请选择订单状态", |
|
|
|
message: "请选择区", |
|
|
|
trigger: "change", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "订单金额", |
|
|
|
label: "详细地址", |
|
|
|
prop: "price", |
|
|
|
prop: "shippingAddress", |
|
|
|
search: true, |
|
|
|
search: false, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
rules: [ |
|
|
|
rules: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
required: true, |
|
|
|
message: "请输入订单金额", |
|
|
|
message: "请输入详细地址", |
|
|
|
trigger: "blur", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "商品名称", |
|
|
|
|
|
|
|
prop: "productId", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
search: false, |
|
|
|
|
|
|
|
formslot: true, |
|
|
|
|
|
|
|
labelslot: true, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
span: 8, |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "name", |
|
|
|
|
|
|
|
value: "id", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-sim/product/fillData", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "商品规格", |
|
|
|
|
|
|
|
prop: "productSpecsId", |
|
|
|
|
|
|
|
type: "select", |
|
|
|
|
|
|
|
search: false, |
|
|
|
|
|
|
|
span: 8, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
formslot: true, |
|
|
|
|
|
|
|
labelslot: true, |
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
label: "name", |
|
|
|
|
|
|
|
value: "id", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dicUrl: "/api/iot-sim/productspecs/fillData", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: "商品数量", |
|
|
|
|
|
|
|
prop: "itemnum", |
|
|
|
|
|
|
|
search: false, |
|
|
|
|
|
|
|
labelslot: true, |
|
|
|
|
|
|
|
span: 8, |
|
|
|
|
|
|
|
hide: true, |
|
|
|
|
|
|
|
formslot: true, |
|
|
|
|
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: [], |
|
|
|
data: [], |
|
|
@ -498,10 +801,17 @@ export default { |
|
|
|
{ required: false, message: "请选择出库商品", trigger: "blur" }, |
|
|
|
{ required: false, message: "请选择出库商品", trigger: "blur" }, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
viewVisiable: false, //查看弹窗 |
|
|
|
|
|
|
|
productIdArr: [], //商品下拉 |
|
|
|
|
|
|
|
productSpecsIdArr: [], //规格下拉 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
rowSave(row, done, loading) { |
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
|
|
|
row.specsAndNum = this.dynamicValidateForm.domains; |
|
|
|
|
|
|
|
row.area = row.$area; |
|
|
|
|
|
|
|
row.city = row.$city; |
|
|
|
|
|
|
|
row.provence = row.$provence; |
|
|
|
add(row).then( |
|
|
|
add(row).then( |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
@ -509,6 +819,7 @@ export default { |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = []; |
|
|
|
done(); |
|
|
|
done(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
(error) => { |
|
|
|
(error) => { |
|
|
@ -518,6 +829,10 @@ export default { |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
|
|
|
row.specsAndNum = this.dynamicValidateForm.domains; |
|
|
|
|
|
|
|
row.area = row.$area; |
|
|
|
|
|
|
|
row.city = row.$city; |
|
|
|
|
|
|
|
row.provence = row.$provence; |
|
|
|
update(row).then( |
|
|
|
update(row).then( |
|
|
|
() => { |
|
|
|
() => { |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
@ -525,6 +840,7 @@ export default { |
|
|
|
type: "success", |
|
|
|
type: "success", |
|
|
|
message: "操作成功!", |
|
|
|
message: "操作成功!", |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = []; |
|
|
|
done(); |
|
|
|
done(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
(error) => { |
|
|
|
(error) => { |
|
|
@ -551,13 +867,64 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeOpen(done, type) { |
|
|
|
beforeOpen(done, type) { |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
productId: "", |
|
|
|
|
|
|
|
productSpecsId: "", |
|
|
|
|
|
|
|
itemnum: "", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
]; |
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
getDetail(this.form.id).then((res) => { |
|
|
|
getDetail(this.form.id).then((res) => { |
|
|
|
this.form = res.data.data; |
|
|
|
this.form = res.data.data; |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains = res.data.data.ordersDetailsList; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
productfillData().then((res) => { |
|
|
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
|
|
|
this.productIdArr = res.data.data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
done(); |
|
|
|
done(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
handleProduct(e) { |
|
|
|
|
|
|
|
this.form.productSpecsId = undefined; |
|
|
|
|
|
|
|
this.productspecsfillDatas(e); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//规格下拉 |
|
|
|
|
|
|
|
productspecsfillDatas(id) { |
|
|
|
|
|
|
|
productspecsfillData(id).then((res) => { |
|
|
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
|
|
|
this.productSpecsIdArr = res.data.data; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//新增商品 |
|
|
|
|
|
|
|
addDomain() { |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains.push({ |
|
|
|
|
|
|
|
productId: "", |
|
|
|
|
|
|
|
productSpecsId: "", |
|
|
|
|
|
|
|
itemnum: "", |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//删除商品 |
|
|
|
|
|
|
|
removeDomain(item) { |
|
|
|
|
|
|
|
var index = this.dynamicValidateForm.domains.indexOf(item); |
|
|
|
|
|
|
|
if (index !== -1) { |
|
|
|
|
|
|
|
this.dynamicValidateForm.domains.splice(index, 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleView(row) { |
|
|
|
|
|
|
|
this.viewVisiable = true; |
|
|
|
|
|
|
|
getDetail(row.id).then((res) => { |
|
|
|
|
|
|
|
this.form = res.data.data; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleViewClose() { |
|
|
|
|
|
|
|
this.viewVisiable = false; |
|
|
|
|
|
|
|
this.form = {}; |
|
|
|
|
|
|
|
}, |
|
|
|
searchReset() { |
|
|
|
searchReset() { |
|
|
|
this.query = {}; |
|
|
|
this.query = {}; |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|