|
@@ -10,8 +10,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="销售类型" prop="chName">
|
|
|
|
- <el-input v-model="screenForm.chName" placeholder="请输入销售类型"></el-input>
|
|
|
|
|
|
+ <el-form-item label="销售类型" prop="salesType">
|
|
|
|
+ <el-input v-model="screenForm.salesType" placeholder="请输入销售类型"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
@@ -20,31 +20,31 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="产品编码" prop="chName">
|
|
|
|
- <el-input v-model="screenForm.chName" placeholder="请输入产品编码"></el-input>
|
|
|
|
|
|
+ <el-form-item label="产品编码" prop="chNum">
|
|
|
|
+ <el-input v-model="screenForm.chNum" placeholder="请输入产品编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="规格型号" prop="chName">
|
|
|
|
- <el-input v-model="screenForm.chName" placeholder="请输入规格型号"></el-input>
|
|
|
|
|
|
+ <el-form-item label="规格型号" prop="model">
|
|
|
|
+ <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="品类" prop="status">
|
|
|
|
- <el-select v-model="screenForm.status" placeholder="全部">
|
|
|
|
|
|
+ <el-form-item label="品类" prop="type">
|
|
|
|
+ <el-select v-model="screenForm.type" placeholder="全部">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="全部" value=""></el-option>
|
|
- <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
|
|
|
|
|
|
+ <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="经销商名称" prop="chName">
|
|
|
|
- <el-input v-model="screenForm.chName" placeholder="请输入经销商名称"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商名称" prop="jxsName">
|
|
|
|
+ <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="经销商编码" prop="chName">
|
|
|
|
- <el-input v-model="screenForm.chName" placeholder="请输入经销商编码"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商编码" prop="jxsNum">
|
|
|
|
+ <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
@@ -65,19 +65,24 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<div class="table">
|
|
- <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
|
- <el-table-column align="center" label="单据号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="订单类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="单价" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="金额" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="经销商编码" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column align="center" label="经销商名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
|
|
+ <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单据号" prop="billNo" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="订单类型" prop="orderType" min-width="160" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{scope.row.orderType | orderTypeFilter}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="销售类型" prop="saleName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="数量" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="金额" prop="amount" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -97,7 +102,7 @@
|
|
|
|
|
|
<div class="">
|
|
<div class="">
|
|
<div>
|
|
<div>
|
|
- <el-button size="small" type="primary">提 交</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="primary" @click="clickSubmit()">提 交</el-button>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 10px; font-size: 14px; color: #666;">注:提交成功后,系统将自动生成采购计划订单</div>
|
|
<div style="margin-top: 10px; font-size: 14px; color: #666;">注:提交成功后,系统将自动生成采购计划订单</div>
|
|
</div>
|
|
</div>
|
|
@@ -106,10 +111,19 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { COMMON_SELECT } from '@/utils/select_data'
|
|
|
|
-import { getList } from "@/api/supply/purchase";
|
|
|
|
|
|
+import { getSumList, submitPlan } from "@/api/supply/purchase";
|
|
|
|
+import { getDictList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
|
+ filters: {
|
|
|
|
+ orderTypeFilter(val) {
|
|
|
|
+ const MAP = {
|
|
|
|
+ 1: '工程计划单',
|
|
|
|
+ 2: '零售计划单',
|
|
|
|
+ }
|
|
|
|
+ return MAP[val]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
currentPage: 1, // 当前页码
|
|
currentPage: 1, // 当前页码
|
|
@@ -119,36 +133,37 @@ export default {
|
|
listLoading: false, // 列表加载loading
|
|
listLoading: false, // 列表加载loading
|
|
screenForm: { // 筛选表单数据
|
|
screenForm: { // 筛选表单数据
|
|
orderNum: '',
|
|
orderNum: '',
|
|
- jxsName: '',
|
|
|
|
|
|
+ salesType: '',
|
|
chName: '',
|
|
chName: '',
|
|
|
|
+ chNum: '',
|
|
model: '',
|
|
model: '',
|
|
- date: '',
|
|
|
|
|
|
+ type: '',
|
|
|
|
+ jxsName: '',
|
|
jxsNum: '',
|
|
jxsNum: '',
|
|
- status: '',
|
|
|
|
},
|
|
},
|
|
- select_status: [ // 筛选字段 - 状态
|
|
|
|
- { label: '正常', value: true },
|
|
|
|
- { label: '冻结', value: false }
|
|
|
|
- ],
|
|
|
|
|
|
+ typeList: [],
|
|
|
|
|
|
- jumpType: '',
|
|
|
|
- queryItem: {},
|
|
|
|
|
|
+ multipleSelection: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
exParams() {
|
|
exParams() {
|
|
return {
|
|
return {
|
|
- userName: this.screenForm.account,
|
|
|
|
- nickName: this.screenForm.nickName,
|
|
|
|
- linkPhone: this.screenForm.phone,
|
|
|
|
- email: this.screenForm.email,
|
|
|
|
- status: this.screenForm.status,
|
|
|
|
|
|
+ billNo: this.screenForm.orderNum,
|
|
|
|
+ saleName: this.screenForm.salesType,
|
|
|
|
+ materialName: this.screenForm.chName,
|
|
|
|
+ materialNumber: this.screenForm.chNum,
|
|
|
|
+ specification: this.screenForm.model,
|
|
|
|
+ materialType: this.screenForm.type,
|
|
|
|
+ customerName: this.screenForm.jxsName,
|
|
|
|
+ customerNumber: this.screenForm.jxsNum,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
|
|
created() {
|
|
created() {
|
|
|
|
+ this.getDictList();
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -162,6 +177,12 @@ export default {
|
|
return true
|
|
return true
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ getDictList() {
|
|
|
|
+ getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
|
|
|
|
+ this.typeList = res.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
// 查询列表
|
|
// 查询列表
|
|
getList() {
|
|
getList() {
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
@@ -169,13 +190,16 @@ export default {
|
|
let params = {
|
|
let params = {
|
|
pageNum: this.currentPage,
|
|
pageNum: this.currentPage,
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
- userName: this.screenForm.account,
|
|
|
|
- nickName: this.screenForm.nickName,
|
|
|
|
- linkPhone: this.screenForm.phone,
|
|
|
|
- email: this.screenForm.email,
|
|
|
|
- status: this.screenForm.status,
|
|
|
|
|
|
+ billNo: this.screenForm.orderNum,
|
|
|
|
+ saleName: this.screenForm.salesType,
|
|
|
|
+ materialName: this.screenForm.chName,
|
|
|
|
+ materialNumber: this.screenForm.chNum,
|
|
|
|
+ specification: this.screenForm.model,
|
|
|
|
+ materialType: this.screenForm.type,
|
|
|
|
+ customerName: this.screenForm.jxsName,
|
|
|
|
+ customerNumber: this.screenForm.jxsNum,
|
|
};
|
|
};
|
|
- getList(params).then((res) => {
|
|
|
|
|
|
+ getSumList(params).then((res) => {
|
|
this.dataList = res.data.records;
|
|
this.dataList = res.data.records;
|
|
this.listTotal = res.data.total;
|
|
this.listTotal = res.data.total;
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
@@ -207,6 +231,26 @@ export default {
|
|
this.currentPage = val;
|
|
this.currentPage = val;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ // 表格选择
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.multipleSelection = val;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 提交
|
|
|
|
+ clickSubmit() {
|
|
|
|
+ if(this.multipleSelection.length < 1) {
|
|
|
|
+ return this.$errorMsg('请选择单据');
|
|
|
|
+ }
|
|
|
|
+ let ids = [];
|
|
|
|
+ this.multipleSelection.forEach(item => {
|
|
|
|
+ ids.push(item.id);
|
|
|
|
+ });
|
|
|
|
+ submitPlan(ids).then(res => {
|
|
|
|
+ this.$successMsg();
|
|
|
|
+ this.getList();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|