供应商绑定用户,报价自动带入供应商,
This commit is contained in:
parent
bc8a230f04
commit
cc6ef0ce4c
|
|
@ -1,5 +1,14 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询用户列表-全量查询
|
||||||
|
export function listUserAll(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/list_all',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 分页查询 列表
|
// 分页查询 列表
|
||||||
export function supplierPageApi(data) {
|
export function supplierPageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -48,23 +48,25 @@
|
||||||
{{ baseInfo.inquiryNotes }}
|
{{ baseInfo.inquiryNotes }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属区域" prop="areaId">
|
<el-descriptions-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="baseInfo.areaId"
|
{{ baseInfo.areaName }}
|
||||||
|
<!-- <el-cascader v-model="baseInfo.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
}" @change="handleAreaChange">
|
}" @change="handleAreaChange">
|
||||||
</el-cascader>
|
</el-cascader> -->
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="邀请供应商" prop="supplierId">
|
<el-descriptions-item label="邀请供应商" prop="supplierId">
|
||||||
<el-select v-model="baseInfo.supplierId" @change="handleSupplierChange" placeholder="请选择供应商" style="width: 100%;">
|
{{ baseInfo.supplierName }}
|
||||||
|
<!-- <el-select v-model="baseInfo.supplierId" @change="handleSupplierChange" placeholder="请选择供应商" style="width: 100%;">
|
||||||
<el-option v-for="item in supplierOptions"
|
<el-option v-for="item in supplierOptions"
|
||||||
:key="item.supplierId"
|
:key="item.supplierId"
|
||||||
:label="item.supplierName"
|
:label="item.supplierName"
|
||||||
:value="item.supplierId"
|
:value="item.supplierId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -350,7 +352,7 @@ export default {
|
||||||
delMaterial(){
|
delMaterial(){
|
||||||
this.batchIds.forEach(ID=>{
|
this.batchIds.forEach(ID=>{
|
||||||
let index = this.materialList.findIndex(v=>v.materialId==ID)
|
let index = this.materialList.findIndex(v=>v.materialId==ID)
|
||||||
if(index>-1){
|
if(index>-1){
|
||||||
this.materialList.splice(index,1)
|
this.materialList.splice(index,1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -369,7 +371,6 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
this.$modal.msgError("请先选择区域");
|
this.$modal.msgError("请先选择区域");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -426,6 +427,7 @@ export default {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
||||||
param.detailList = []
|
param.detailList = []
|
||||||
|
console.log(param.arrivalTime)
|
||||||
if(param.arrivalTime.includes('1970')){
|
if(param.arrivalTime.includes('1970')){
|
||||||
this.$modal.msgError("请选择交货时间!");
|
this.$modal.msgError("请选择交货时间!");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -72,39 +72,39 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商编号" align="center" prop="supplierCode" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="供应商编号" align="center" prop="supplierCode" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120" />
|
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="供应商评分" align="center" prop="supplierScore" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="供应商评分" align="center" prop="supplierScore" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="主要联系人" align="center" prop="linkman" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="主要联系人" align="center" prop="linkman" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="用户手机号" align="center" prop="telephone" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="联系人手机号" align="center" prop="linkmanPhone" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="营业执照编号" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="营业执照编号" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="食品经营许可证编号" align="center" prop="" :show-overflow-tooltip="true" width="180"/>
|
<el-table-column label="食品经营许可证编号" align="center" prop="" :show-overflow-tooltip="true" width="180"/>
|
||||||
<el-table-column label="供应类别" align="center" prop="categoryModelStr" :show-overflow-tooltip="true" width="150"/>
|
<el-table-column label="供应类别" align="center" prop="categoryModelStr" :show-overflow-tooltip="true" width="150"/>
|
||||||
<el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="地址" align="center" prop="address" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="2"
|
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="2"
|
||||||
@change="handleStatusChange(scope.row)"
|
@change="handleStatusChange(scope.row)"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
@ -131,26 +131,38 @@
|
||||||
<el-input v-model="form.supplierSimpleName" placeholder="请输入供应商简称" maxlength="30" clearable/>
|
<el-input v-model="form.supplierSimpleName" placeholder="请输入供应商简称" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供应商地址" prop="regionProvince">
|
||||||
|
<el-input v-model="form.regionProvince" placeholder="请输入供应商地址" maxlength="30" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="绑定供应商用户" prop="supplierUserId">
|
||||||
|
<el-select v-model="form.supplierUserId" placeholder="请选择绑定供应商用户" style="width: 100%;" clearable>
|
||||||
|
<el-option v-for="item in supplierUserList"
|
||||||
|
:key="item.userId"
|
||||||
|
:label="item.userName"
|
||||||
|
:value="item.userId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="供应商电话" prop="telephone">
|
<el-form-item label="供应商电话" prop="telephone">
|
||||||
<el-input v-model="form.telephone" placeholder="请输入供应商电话" maxlength="11" clearable/>
|
<el-input v-model="form.telephone" placeholder="请输入供应商电话" maxlength="11" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="公司网站" prop="companyWeb">
|
<el-form-item label="公司网站" prop="companyWeb">
|
||||||
<el-input v-model="form.companyWeb" placeholder="请输入公司网站" maxlength="30" clearable/>
|
<el-input v-model="form.companyWeb" placeholder="请输入公司网站" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供应商地址" prop="regionProvince">
|
<!-- <el-col :span="12">
|
||||||
<el-input v-model="form.regionProvince" placeholder="请输入供应商地址" maxlength="30" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="详细地址" prop="address">
|
<el-form-item label="详细地址" prop="address">
|
||||||
<el-input v-model="form.address" placeholder="请输入详细地址" maxlength="30" clearable/>
|
<el-input v-model="form.address" placeholder="请输入详细地址" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="form.areaId"
|
<el-cascader v-model="form.areaId"
|
||||||
|
|
@ -191,7 +203,7 @@
|
||||||
<el-input v-model="form.bankAccount" placeholder="请输入银行账号" maxlength="30" clearable/>
|
<el-input v-model="form.bankAccount" placeholder="请输入银行账号" maxlength="30" clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="税率" prop="taxRate">
|
<el-form-item label="税率" prop="taxRate">
|
||||||
<el-select v-model="form.taxRate" placeholder="请选择税率" style="width: 100%;">
|
<el-select v-model="form.taxRate" placeholder="请选择税率" style="width: 100%;">
|
||||||
<el-option label="3%" :value="1"></el-option>
|
<el-option label="3%" :value="1"></el-option>
|
||||||
|
|
@ -212,7 +224,7 @@
|
||||||
<el-option label="年" :value="7"></el-option>
|
<el-option label="年" :value="7"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="主要联系人" prop="linkman">
|
<el-form-item label="主要联系人" prop="linkman">
|
||||||
<el-input v-model="form.linkman" placeholder="请输入主要联系人" maxlength="30" clearable/>
|
<el-input v-model="form.linkman" placeholder="请输入主要联系人" maxlength="30" clearable/>
|
||||||
|
|
@ -591,7 +603,7 @@
|
||||||
<el-tab-pane label="账户通知配置" name="notice">
|
<el-tab-pane label="账户通知配置" name="notice">
|
||||||
|
|
||||||
</el-tab-pane> -->
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
@ -618,8 +630,7 @@
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi } from "@/api/dish/material";
|
import { systemMaterialTreeApi } from "@/api/dish/material";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { supplierPageApi,addSupplierApi, editSupplierApi, removeSupplierApi, editStatusSupplierApi } from "@/api/foodManage/supplierManage";
|
import { listUserAll,supplierPageApi,addSupplierApi, editSupplierApi, removeSupplierApi, editStatusSupplierApi } from "@/api/foodManage/supplierManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -675,6 +686,9 @@ export default {
|
||||||
categoryIdList: [
|
categoryIdList: [
|
||||||
{ required: true, message: "主要供应类别不能为空", trigger: "change" }
|
{ required: true, message: "主要供应类别不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
|
supplierUserId: [
|
||||||
|
{ required: true, message: "供应商用户不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
telephone: [
|
telephone: [
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
|
|
@ -749,6 +763,7 @@ export default {
|
||||||
attachmentList:[],
|
attachmentList:[],
|
||||||
dialogVisible:false,//图片弹窗
|
dialogVisible:false,//图片弹窗
|
||||||
dialogImageUrl:"",//图片弹窗
|
dialogImageUrl:"",//图片弹窗
|
||||||
|
supplierUserList:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -767,6 +782,7 @@ export default {
|
||||||
this.getTypeTreeData();
|
this.getTypeTreeData();
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getSupplierUserList();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -783,6 +799,15 @@ export default {
|
||||||
this.treeOptions = response.data;
|
this.treeOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getSupplierUserList(){
|
||||||
|
let param = {
|
||||||
|
deptId:225
|
||||||
|
}
|
||||||
|
listUserAll(param).then((response) => {
|
||||||
|
this.supplierUserList = response.rows
|
||||||
|
// this.total = response.total
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
|
@ -878,6 +903,7 @@ export default {
|
||||||
arr.push(item.categoryId)
|
arr.push(item.categoryId)
|
||||||
})
|
})
|
||||||
this.$set(this.form,"categoryIdList",arr)
|
this.$set(this.form,"categoryIdList",arr)
|
||||||
|
this.$set(this.form,"supplierUserId",Number(row.supplierUserId))
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改";
|
this.title = "修改";
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue