|
@@ -22,6 +22,7 @@
|
|
|
:newTime="newTime"
|
|
|
v-if="newTime !== '' && sitem"
|
|
|
:sitem="sitem"
|
|
|
+ border
|
|
|
:columns="ShowDataTableColumns"
|
|
|
>
|
|
|
<template slot="good_name">
|
|
@@ -65,7 +66,7 @@
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
<el-row>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="购买数量" prop="good_num">
|
|
|
<digital-input
|
|
|
:values="ruleForm.good_num"
|
|
@@ -82,7 +83,24 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="10">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="商品单价" prop="sale_price">
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.sale_price"
|
|
|
+ :placeholder="'商品单价'"
|
|
|
+ :min="sitem.sale_price"
|
|
|
+ :max="100000000000"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :disabled="false"
|
|
|
+ :append="'元'"
|
|
|
+ @reschange="num_change($event, 'sale_price')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
<el-form-item label="发货方式" prop="sendtype">
|
|
|
<el-select
|
|
|
v-model="ruleForm.sendtype"
|
|
@@ -99,7 +117,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="text-align: right">
|
|
|
+ <el-col :span="2" style="text-align: right">
|
|
|
<el-button :size="'mini'" type="primary" @click="submitForm"
|
|
|
>保 存
|
|
|
</el-button>
|
|
@@ -370,6 +388,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+ const validate_num_0 = (rule, value, callback) => {
|
|
|
+ const { required } = rule;
|
|
|
+ if (required && value === "") {
|
|
|
+ callback(new Error("不能为空!"));
|
|
|
+ } else if (
|
|
|
+ required &&
|
|
|
+ (value === "0" ||
|
|
|
+ value === "0." ||
|
|
|
+ value === "0.0" ||
|
|
|
+ value === "0.00" ||
|
|
|
+ value === "0.000")
|
|
|
+ ) {
|
|
|
+ callback(new Error("不能为零!"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
loading: false,
|
|
|
addrmodel: false,
|
|
@@ -391,6 +426,7 @@ export default {
|
|
|
ruleForm: {
|
|
|
bidNo: "", //咨询单反馈编号
|
|
|
good_num: "", //商品数量
|
|
|
+ sale_price: "",
|
|
|
sendtype: "1", // 发货方式
|
|
|
arrtime: "", // 到货时间
|
|
|
},
|
|
@@ -399,7 +435,14 @@ export default {
|
|
|
good_num: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "商品数量",
|
|
|
+ validator: validate_num_0,
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ sale_price: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validate_num_0,
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
@@ -513,10 +556,11 @@ export default {
|
|
|
if (this.$refs.ruleForm) {
|
|
|
this.$refs.ruleForm.resetFields();
|
|
|
this.$refs.ruleForm.clearValidate();
|
|
|
- const { bidNo, in_num, in_arrival_time } = this.sitem;
|
|
|
+ const { bidNo, in_num, in_arrival_time, sale_price } = this.sitem;
|
|
|
this.ruleForm = {
|
|
|
bidNo: bidNo || "", //咨询单反馈编号
|
|
|
good_num: in_num || "0", //商品数量
|
|
|
+ sale_price: sale_price || "",
|
|
|
sendtype: "1", // 发货方式
|
|
|
arrtime: in_arrival_time || "", // 到货时间
|
|
|
};
|