|
@@ -27,51 +27,66 @@
|
|
|
<el-col :span="24" style="padding: 0 0 10px 0; margin-top: -5px">
|
|
|
<el-divider><el-tag size="mini">确认单信息</el-tag></el-divider>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="创建人" prop="sale_name">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="销售员" prop="sale_name">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.sale_name"
|
|
|
- placeholder="请输入创建人"
|
|
|
+ placeholder="销售员"
|
|
|
:disabled="isDetail"
|
|
|
maxlength="200"
|
|
|
/> </el-form-item
|
|
|
></el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="部门" prop="department">
|
|
|
- <el-select v-model="ruleForm.department" placeholder="部门">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="销售员部门" prop="department">
|
|
|
+ <el-select v-model="ruleForm.department" placeholder="销售员部门">
|
|
|
<el-option
|
|
|
v-for="item in depart_options"
|
|
|
:key="item.value"
|
|
|
:label="item.value"
|
|
|
:value="item.value"
|
|
|
- :disabled="item.status!=='1'"
|
|
|
+ :disabled="item.status !== '1'"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
- <!-- <el-input
|
|
|
- v-model.trim="ruleForm.department"
|
|
|
- placeholder="请输入部门"
|
|
|
- disabled
|
|
|
- maxlength="200"
|
|
|
- /> -->
|
|
|
- </el-form-item></el-col
|
|
|
- >
|
|
|
- <el-col :span="6">
|
|
|
+ </el-select> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="确认单类型" prop="qrdType">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.qrdType"
|
|
|
- placeholder="请输入确认单类型"
|
|
|
+ placeholder="确认单类型"
|
|
|
disabled
|
|
|
maxlength="200"
|
|
|
/> </el-form-item
|
|
|
></el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="采购员" prop="buyer">
|
|
|
+ <el-input
|
|
|
+ v-model.trim="ruleForm.buyer"
|
|
|
+ placeholder="采购员"
|
|
|
+ :disabled="isDetail"
|
|
|
+ maxlength="200"
|
|
|
+ /> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="采购员部门" prop="buy_depart">
|
|
|
+ <el-select v-model="ruleForm.buy_depart" placeholder="采购员部门">
|
|
|
+ <el-option
|
|
|
+ v-for="item in depart_options2"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :disabled="item.status !== '1'"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select> </el-form-item
|
|
|
+ ></el-col>
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="采购毛利率" prop="cgd_tax">
|
|
|
<el-input-number
|
|
|
style="width: 100%"
|
|
|
v-model="ruleForm.cgd_tax"
|
|
|
controls-position="right"
|
|
|
- placeholder="请输入采购毛利率"
|
|
|
+ placeholder="采购毛利率"
|
|
|
:disabled="isDetail"
|
|
|
:min="0"
|
|
|
:precision="2"
|
|
@@ -85,7 +100,7 @@
|
|
|
<el-form-item label="单据号" prop="sequenceNo">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.sequenceNo"
|
|
|
- placeholder="请输入单据号"
|
|
|
+ placeholder="单据号"
|
|
|
:disabled="isDetail"
|
|
|
maxlength="200"
|
|
|
/>
|
|
@@ -94,7 +109,7 @@
|
|
|
<el-form-item label="PO编号" prop="poNo">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.poNo"
|
|
|
- placeholder="请输入PO编号"
|
|
|
+ placeholder="PO编号"
|
|
|
:disabled="isDetail"
|
|
|
maxlength="200"
|
|
|
/>
|
|
@@ -104,7 +119,7 @@
|
|
|
<el-form-item label="购买方公司" prop="khNo">
|
|
|
<search-select
|
|
|
:code="ruleForm.khNo"
|
|
|
- :placeholder="'请选择购买方公司'"
|
|
|
+ :placeholder="'购买方公司'"
|
|
|
@end="searchChange1"
|
|
|
:names="searchName1"
|
|
|
:is-detail="id !== 'add'"
|
|
@@ -118,7 +133,7 @@
|
|
|
<el-form-item label="销售方公司" prop="companyNo">
|
|
|
<search-select
|
|
|
:code="ruleForm.companyNo"
|
|
|
- :placeholder="'请选择销售方公司'"
|
|
|
+ :placeholder="'销售方公司'"
|
|
|
@end="searchChange2"
|
|
|
:names="searchName2"
|
|
|
:type="'2'"
|
|
@@ -135,7 +150,7 @@
|
|
|
<el-form-item label="收货人" prop="contactor">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.contactor"
|
|
|
- placeholder="请输入收货人"
|
|
|
+ placeholder="收货人"
|
|
|
maxlength="200"
|
|
|
:disabled="isDetail"
|
|
|
/>
|
|
@@ -145,7 +160,7 @@
|
|
|
<el-form-item label="联系电话" prop="mobile">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.mobile"
|
|
|
- placeholder="请输入联系电话"
|
|
|
+ placeholder="联系电话"
|
|
|
maxlength="200"
|
|
|
:disabled="isDetail"
|
|
|
/>
|
|
@@ -155,7 +170,7 @@
|
|
|
<el-form-item label="联系地址" prop="addr">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.addr"
|
|
|
- placeholder="请输入联系地址"
|
|
|
+ placeholder="联系地址"
|
|
|
maxlength="200"
|
|
|
:disabled="isDetail"
|
|
|
/>
|
|
@@ -169,7 +184,7 @@
|
|
|
:clearable="true"
|
|
|
:size="'mini'"
|
|
|
:picker-options="pickerOptions"
|
|
|
- placeholder="请选择发货时间"
|
|
|
+ placeholder="发货时间"
|
|
|
style="width: 100%; margin: 0"
|
|
|
type="datetime"
|
|
|
:disabled="isDetail"
|
|
@@ -185,7 +200,7 @@
|
|
|
<el-form-item label="供应商公司" prop="supplierNo">
|
|
|
<search-select
|
|
|
:code="ruleForm.supplierNo"
|
|
|
- :placeholder="'请选择供应商公司'"
|
|
|
+ :placeholder="'供应商公司'"
|
|
|
@end="searchChange3"
|
|
|
:type="'3'"
|
|
|
:size="'mini'"
|
|
@@ -201,7 +216,7 @@
|
|
|
style="width: 100%"
|
|
|
filterable
|
|
|
:disabled="isDetail"
|
|
|
- placeholder="请选择商品分类"
|
|
|
+ placeholder="商品分类"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in options"
|
|
@@ -216,7 +231,7 @@
|
|
|
<el-form-item label="商品名称" prop="goodName">
|
|
|
<el-input
|
|
|
v-model.trim="ruleForm.goodName"
|
|
|
- placeholder="请输入商品名称"
|
|
|
+ placeholder="商品名称"
|
|
|
maxlength="200"
|
|
|
:disabled="isDetail"
|
|
|
/> </el-form-item
|
|
@@ -228,7 +243,7 @@
|
|
|
style="width: 100%"
|
|
|
v-model="ruleForm.goodNum"
|
|
|
controls-position="right"
|
|
|
- placeholder="请输入数量"
|
|
|
+ placeholder="数量"
|
|
|
:disabled="isDetail"
|
|
|
:min="0"
|
|
|
:precision="0"
|
|
@@ -243,7 +258,7 @@
|
|
|
<el-input-number
|
|
|
v-model="ruleForm.goodPice"
|
|
|
controls-position="right"
|
|
|
- placeholder="请输入单价"
|
|
|
+ placeholder="单价"
|
|
|
style="width: 100%"
|
|
|
:disabled="isDetail"
|
|
|
:min="0"
|
|
@@ -259,7 +274,7 @@
|
|
|
<el-form-item label="货款总额" prop="good_total">
|
|
|
<el-input
|
|
|
v-model.number="ruleForm.good_total"
|
|
|
- placeholder="请输入货款总额"
|
|
|
+ placeholder="货款总额"
|
|
|
disabled
|
|
|
><template slot="append">元</template></el-input
|
|
|
>
|
|
@@ -269,7 +284,7 @@
|
|
|
<el-form-item label="税率" prop="tax">
|
|
|
<search-select
|
|
|
:code="ruleForm.tax"
|
|
|
- :placeholder="'请选择税率'"
|
|
|
+ :placeholder="'税率'"
|
|
|
@end="searchChange4"
|
|
|
:type="'4'"
|
|
|
:size="'mini'"
|
|
@@ -309,7 +324,7 @@ export default {
|
|
|
callback(new Error("联系电话格式不正确!"));
|
|
|
}
|
|
|
} else {
|
|
|
- callback(new Error("请输入联系电话!"));
|
|
|
+ callback(new Error("联系电话!"));
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -319,34 +334,65 @@ export default {
|
|
|
searchName3: "",
|
|
|
searchName4: "",
|
|
|
company_img: "",
|
|
|
- depart_options:[
|
|
|
+ depart_options: [
|
|
|
+ {
|
|
|
+ status: "1",
|
|
|
+ value: "网络部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "1",
|
|
|
+ value: "客服部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "0",
|
|
|
+ value: "项目部",
|
|
|
+ },
|
|
|
{
|
|
|
- status:'1',
|
|
|
- value:'网络部'
|
|
|
+ status: "0",
|
|
|
+ value: "平台部",
|
|
|
},
|
|
|
{
|
|
|
- status:'1',
|
|
|
- value:'客服部'
|
|
|
+ status: "0",
|
|
|
+ value: "财务部",
|
|
|
},
|
|
|
{
|
|
|
- status:'0',
|
|
|
- value:'项目部'
|
|
|
+ status: "0",
|
|
|
+ value: "采购部",
|
|
|
},
|
|
|
{
|
|
|
- status:'0',
|
|
|
- value:'平台部'
|
|
|
+ status: "0",
|
|
|
+ value: "产品部",
|
|
|
},
|
|
|
+ ],
|
|
|
+ depart_options2: [
|
|
|
{
|
|
|
- status:'0',
|
|
|
- value:'财务部'
|
|
|
+ status: "1",
|
|
|
+ value: "网络部",
|
|
|
},
|
|
|
{
|
|
|
- status:'0',
|
|
|
- value:'采购部'
|
|
|
+ status: "1",
|
|
|
+ value: "采购部",
|
|
|
},
|
|
|
{
|
|
|
- status:'0',
|
|
|
- value:'产品部'
|
|
|
+ status: "0",
|
|
|
+ value: "客服部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "0",
|
|
|
+ value: "项目部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "0",
|
|
|
+ value: "平台部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "0",
|
|
|
+ value: "财务部",
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ status: "0",
|
|
|
+ value: "产品部",
|
|
|
},
|
|
|
],
|
|
|
options: [],
|
|
@@ -367,28 +413,42 @@ export default {
|
|
|
sale_name: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入创建人",
|
|
|
+ message: "销售员不能为空!",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
department: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入部门",
|
|
|
+ message: "销售员部门不能为空!",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ buyer: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "采购员不能为空!",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
+ buy_depart: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "采购员部门不能为空!",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
cgd_tax: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入采购毛利率",
|
|
|
+ message: "采购毛利率",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
cat_f: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请选择商品分类",
|
|
|
+ message: "商品分类",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
@@ -396,35 +456,35 @@ export default {
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择供应商公司",
|
|
|
+ message: "供应商公司",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
qrdType: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入订单类型",
|
|
|
+ message: "订单类型",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
good_total: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入货款总金额",
|
|
|
+ message: "货款总金额",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
sequenceNo: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入单据号",
|
|
|
+ message: "单据号",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
poNo: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入PO编号",
|
|
|
+ message: "PO编号",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
@@ -432,7 +492,7 @@ export default {
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择购买方公司",
|
|
|
+ message: "购买方公司",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
@@ -440,7 +500,7 @@ export default {
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择税率",
|
|
|
+ message: "税率",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
@@ -448,14 +508,14 @@ export default {
|
|
|
{
|
|
|
type: "array",
|
|
|
required: true,
|
|
|
- message: "请选择销售方公司",
|
|
|
+ message: "销售方公司",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
contactor: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入收货人",
|
|
|
+ message: "收货人",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
@@ -469,7 +529,7 @@ export default {
|
|
|
addr: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入联系地址",
|
|
|
+ message: "联系地址",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
@@ -477,7 +537,7 @@ export default {
|
|
|
sendtime: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入发货时间",
|
|
|
+ message: "发货时间",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
@@ -485,21 +545,21 @@ export default {
|
|
|
goodName: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入商品名称",
|
|
|
+ message: "商品名称",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
goodPice: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入单价",
|
|
|
+ message: "单价",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
|
goodNum: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: "请输入数量",
|
|
|
+ message: "数量",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
],
|
|
@@ -570,8 +630,8 @@ export default {
|
|
|
//CMP20210608140627719 北京万宇恒通国际科贸有限公司
|
|
|
//GYS-20210416-0316 北京顺捷玖芊科技有限公司
|
|
|
|
|
|
- const res = await asyncRequest.detail({ id: this.id });
|
|
|
- if (res && res.code === 0) {
|
|
|
+ const {code,data,message} = await asyncRequest.detail({ id: this.id });
|
|
|
+ if (code === 0) {
|
|
|
const {
|
|
|
addr,
|
|
|
cgd_tax,
|
|
@@ -596,7 +656,9 @@ export default {
|
|
|
tax,
|
|
|
cat_f,
|
|
|
rateid,
|
|
|
- } = res.data;
|
|
|
+ buy_depart,
|
|
|
+ buyer,
|
|
|
+ } = data;
|
|
|
this.searchName1 = knName;
|
|
|
this.searchName2 = supperinfo;
|
|
|
this.searchName3 = supplier;
|
|
@@ -621,11 +683,13 @@ export default {
|
|
|
goodNum: goodNum * 1,
|
|
|
cgd_tax: cgd_tax * 1,
|
|
|
tax: [rateid],
|
|
|
+ buyer: buyer,
|
|
|
+ buy_depart: buy_depart,
|
|
|
};
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 &&code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
},
|
|
|
async resetForm() {
|
|
@@ -658,6 +722,8 @@ export default {
|
|
|
goodPice: 0,
|
|
|
goodNum: 0,
|
|
|
cgd_tax: 0,
|
|
|
+ buyer: "",
|
|
|
+ buy_depart: "网络部",
|
|
|
tax: [],
|
|
|
};
|
|
|
},
|
|
@@ -705,8 +771,8 @@ export default {
|
|
|
obj.khNo = obj.khNo[0];
|
|
|
obj.supplierNo = obj.supplierNo[0];
|
|
|
obj.tax = obj.tax[0];
|
|
|
- obj.buyer = obj.sale_name;
|
|
|
- obj.buy_depart = obj.department;
|
|
|
+ // obj.buyer = obj.sale_name;
|
|
|
+ // obj.buy_depart = obj.department;
|
|
|
obj.id = this.id;
|
|
|
for (let key in obj) {
|
|
|
obj[key] = obj[key] + "";
|