|
@@ -9,8 +9,8 @@
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item>
|
|
|
- <span slot="label"><span class="required">*</span> 计量单位</span>
|
|
|
+ <el-form-item prop="unit">
|
|
|
+ <span slot="label">计量单位</span>
|
|
|
<el-select v-model="form.unit" placeholder="请选择" @change="passValue">
|
|
|
<el-option
|
|
|
v-for="item in measure"
|
|
@@ -37,6 +37,8 @@
|
|
|
v-model="scope.row.skuSpecsList[0].specsName"
|
|
|
placeholder="请输入规格名称"
|
|
|
clearable
|
|
|
+ maxlength="8"
|
|
|
+ show-word-limit
|
|
|
@input="passValue"
|
|
|
/>
|
|
|
</template>
|
|
@@ -47,25 +49,29 @@
|
|
|
v-model="scope.row.skuSpecsList[0].specsValue"
|
|
|
placeholder="规格内容"
|
|
|
clearable
|
|
|
+ maxlength="8"
|
|
|
+ show-word-limit
|
|
|
@input="passValue"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="库存" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.stock"
|
|
|
placeholder="库存"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }} </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="起批量" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuPriceList[0].minPurchase"
|
|
|
placeholder="起批量"
|
|
|
clearable
|
|
@@ -74,55 +80,59 @@
|
|
|
<template slot="suffix">
|
|
|
{{ form.unit }}
|
|
|
</template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="收购价" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuCost.purchaseFee"
|
|
|
placeholder="收购价"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }}/元 </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="人工费" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuCost.laborFee"
|
|
|
placeholder="人工费"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }}/元 </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="代办费" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuCost.agencyFee"
|
|
|
placeholder="代办费"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }}/元 </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="材料费" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
@input="passValue"
|
|
|
v-model="scope.row.skuCost.materialFee"
|
|
|
placeholder="材料费"
|
|
|
clearable
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }}/元 </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column prop="name" label="原价" width="180"> </el-table-column> -->
|
|
@@ -131,6 +141,19 @@
|
|
|
{{ computePrice(scope.row) }}元/{{ form.unit }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="规格重量" width="160">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
+ v-model="scope.row.weight"
|
|
|
+ placeholder="请输入单个规格重量"
|
|
|
+ clearable
|
|
|
+ @input="passValue"
|
|
|
+ >
|
|
|
+ <template slot="suffix"> /Kg </template>
|
|
|
+ </el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="操作" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -153,6 +176,8 @@
|
|
|
v-model="scope.row.skuSpecsList[0].specsName"
|
|
|
placeholder="请输入规格名称"
|
|
|
clearable
|
|
|
+ maxlength="8"
|
|
|
+ show-word-limit
|
|
|
@input="passValue"
|
|
|
/>
|
|
|
</template>
|
|
@@ -163,25 +188,29 @@
|
|
|
v-model="scope.row.skuSpecsList[0].specsValue"
|
|
|
placeholder="规格内容"
|
|
|
clearable
|
|
|
+ maxlength="8"
|
|
|
+ show-word-limit
|
|
|
@input="passValue"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="name" label="库存" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.stock"
|
|
|
placeholder="库存"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }} </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="起批量" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuPriceList[0].minPurchase"
|
|
|
placeholder="起批量"
|
|
|
clearable
|
|
@@ -190,19 +219,20 @@
|
|
|
<template slot="suffix">
|
|
|
{{ form.unit }}
|
|
|
</template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="批发价" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
v-model="scope.row.skuPriceList[0].originalPrice"
|
|
|
placeholder="收购价"
|
|
|
clearable
|
|
|
@input="passValue"
|
|
|
>
|
|
|
<template slot="suffix"> {{ form.unit }}/元 </template>
|
|
|
- </el-input>
|
|
|
+ </el-input-number>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="address" label="商品单价" width="80">
|
|
@@ -215,6 +245,20 @@
|
|
|
元/{{ form.unit }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="规格重量" width="160">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ :controls="false"
|
|
|
+ v-model="scope.row.weight"
|
|
|
+ placeholder="请输入单个规格重量"
|
|
|
+ clearable
|
|
|
+ @input="passValue"
|
|
|
+ >
|
|
|
+ <template slot="suffix"> /Kg </template>
|
|
|
+ </el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="操作" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -248,8 +292,8 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <span slot="label"><span class="required">*</span> 发货时间</span>
|
|
|
+ <el-form-item prop="shippingTimeDesc">
|
|
|
+ <span slot="label">发货时间</span>
|
|
|
<el-select
|
|
|
v-model="form.shippingTimeDesc"
|
|
|
placeholder="请选择包装方式"
|
|
@@ -313,8 +357,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="margin-top: 20px" v-if="shopInfo.scope == 0">
|
|
|
- <el-form-item>
|
|
|
- <span slot="label"><span class="required">*</span> 运费</span>
|
|
|
+ <el-form-item prop="freeShipping">
|
|
|
+ <span slot="label">运费</span>
|
|
|
<div class="main1">
|
|
|
<el-radio-group
|
|
|
v-model="form.freeShipping"
|
|
@@ -328,8 +372,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24" style="margin-top: 20px">
|
|
|
- <el-form-item>
|
|
|
- <span slot="label"><span class="required">*</span> 发货地址</span>
|
|
|
+ <el-form-item prop="shippingAddrBean.addrDetail">
|
|
|
+ <span slot="label"> 发货地址</span>
|
|
|
<div style="display: flex; flex-direction: row; align-items: center">
|
|
|
<el-button
|
|
|
@click="selectAddr"
|
|
@@ -394,9 +438,11 @@ export default {
|
|
|
rules: {
|
|
|
freeShipping: [{ required: true, message: "请选择运费方式", trigger: "blur" }],
|
|
|
props: [{ required: true, message: "商品属性不能为空", trigger: "blur" }],
|
|
|
- unit: [{ required: true, message: "请选择计量单位", trigger: "blur" }],
|
|
|
+ unit: [{ required: true, message: "计量单位", trigger: "blur" }],
|
|
|
+ shippingTimeDesc: [{ required: true, message: "发货时间不能为空", trigger: "blur" }],
|
|
|
skuList: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
|
|
packing: [{ required: true, message: "包装方式不能为空", trigger: "blur" }],
|
|
|
+ "shippingAddrBean.addrDetail": [{ required: true, message: "详细地址不能为空", trigger: "blur" }],
|
|
|
},
|
|
|
shopInfo: {},
|
|
|
};
|
|
@@ -440,6 +486,19 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ formvalidate() {
|
|
|
+ let that=this
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ that.$refs.queryForm.validate((valid) => {
|
|
|
+ console.log(valid);
|
|
|
+ if (valid) {
|
|
|
+ resolve(valid);
|
|
|
+ } else {
|
|
|
+ resolve(valid);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
getInfo() {
|
|
|
getStoreInfo().then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -532,12 +591,13 @@ export default {
|
|
|
},
|
|
|
addSpecification() {
|
|
|
this.form.skuList.push({
|
|
|
- stock: "",
|
|
|
+ stock: undefined,
|
|
|
+ weight:undefined,
|
|
|
skuCost: {
|
|
|
- purchaseFee: "",
|
|
|
- laborFee: "",
|
|
|
- agencyFee: "",
|
|
|
- materialFee: "",
|
|
|
+ purchaseFee: undefined,
|
|
|
+ laborFee: undefined,
|
|
|
+ agencyFee: undefined,
|
|
|
+ materialFee: undefined,
|
|
|
},
|
|
|
skuSpecsList: [
|
|
|
{
|
|
@@ -548,10 +608,10 @@ export default {
|
|
|
],
|
|
|
skuPriceList: [
|
|
|
{
|
|
|
- minPurchase: "",
|
|
|
- maxPurchase: "",
|
|
|
- price: "",
|
|
|
- originalPrice: "",
|
|
|
+ minPurchase: undefined,
|
|
|
+ maxPurchase: undefined,
|
|
|
+ price: undefined,
|
|
|
+ originalPrice: undefined,
|
|
|
lowestPrice: 1,
|
|
|
},
|
|
|
],
|