|
|
@@ -1,13 +1,27 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container v-show="show" class="page-crad">
|
|
|
- <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
|
|
|
+ <el-tabs v-model="tabsType" type="card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="待采购" name="first"></el-tab-pane>
|
|
|
+ <el-tab-pane label="业务单据" name="second"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <avue-crud v-show="tabsType == 'first'" :option="procureOption" :data="procureData" @refresh-change="listBYStatusfun" >
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button type="text" size="small"
|
|
|
+ @click.stop="procureViewfun(scope.row)">查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <avue-crud v-show="tabsType == 'second'"
|
|
|
+ ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
|
|
|
@search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
@refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
|
|
|
@resetColumn="resetColumn" :cell-style="cellStyle" @selection-change="selectionChange"
|
|
|
@expand-change="expandChange" @search-criteria-switch="searchCriteriaSwitch">
|
|
|
<template slot-scope="{ row }" slot="expand">
|
|
|
- <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
|
|
|
+ <avue-crud ref="itemCrud" :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading"
|
|
|
+ @resetColumn="resetColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
|
|
|
+ @saveColumn="saveColumnTwo('itemCrud', 'itemOption', 'itemOptionList', 2.2)"
|
|
|
:cell-style="cellStyle" class="itemTable"></avue-crud>
|
|
|
</template>
|
|
|
<template slot="createTimeSearch">
|
|
|
@@ -51,10 +65,8 @@
|
|
|
scope.row.strCorpName }}
|
|
|
</span>
|
|
|
</template>
|
|
|
- <template slot-scope="scope" slot="orderNo">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.orderNo
|
|
|
- }}
|
|
|
- </span>
|
|
|
+ <template slot-scope="scope" slot="srcOrderNo">
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(scope.row, 1)">{{ scope.row.srcOrderNo }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="fudaPurchaseStatus">
|
|
|
<span class="el-button--text">
|
|
|
@@ -84,7 +96,9 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
+
|
|
|
<detail-page @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData" v-if="!show"></detail-page>
|
|
|
+
|
|
|
<el-dialog title="导入采购任务" v-if="dialogVisible" :visible.sync="dialogVisible" append-to-body
|
|
|
:close-on-click-modal="false" :close-on-press-escape="false" :before-close="function () {
|
|
|
dialogVisible = false; params = {}
|
|
|
@@ -114,6 +128,7 @@
|
|
|
@resetColumn="resetColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
|
|
|
@saveColumn="saveColumnTwo('dialogCrud', 'dialogOption', 'dialogOptionList', 2.1)"
|
|
|
@refresh-change="refreshChangeTwo" @search-change="searchChangeTwo" @search-reset="searchReset"
|
|
|
+ @selection-change="dialogSelectionChange"
|
|
|
@on-load="dialogOnLoad">
|
|
|
<template slot="menuLeft">
|
|
|
<el-tabs v-model="activeName" @tab-click="tabHandle">
|
|
|
@@ -152,6 +167,41 @@
|
|
|
|
|
|
<report-dialog :switchDialog="switchDialog" :reportId="params.pid" reportName="出口贸易-采购"
|
|
|
@onClose="onClose()"></report-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="导入采购任务" :visible.sync="procureVisible" append-to-body>
|
|
|
+ <avue-crud :data="procurelistData" :option="procurelistOption" :search.sync="params" ref="dialogCrud"
|
|
|
+ @refresh-change="refreshChangeTwo">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-tabs v-model="activeName" @tab-click="tabHandle">
|
|
|
+ <el-tab-pane label="查询结果" name="searchList" />
|
|
|
+ <el-tab-pane label="已选定数据" name="importStaging" />
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+ <template slot="corpNameSearch">
|
|
|
+ <crop-select v-model="params.corpId" corpType="GYS" />
|
|
|
+ </template>
|
|
|
+ <template slot="actualQuantity" slot-scope="scope">
|
|
|
+ <el-input-number v-if="activeName === 'importStaging'" v-model="scope.row.actualQuantity"
|
|
|
+ :precision="2" :min="0.01" :controls="false"></el-input-number>
|
|
|
+ <span v-else>{{ scope.row.actualQuantity }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button type="text" icon="el-icon-edit" size="small"
|
|
|
+ @click.stop="importStagList(scope.row, scope.index)" v-if="activeName == 'searchList'"
|
|
|
+ :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small"
|
|
|
+ @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+<!-- <el-button type="warning" @click="outExport">导出</el-button>-->
|
|
|
+ <el-button type="warning" @click="openReport">导出</el-button>
|
|
|
+ <el-button @click="procureVisible = false;">取 消</el-button>
|
|
|
+ <el-button type="primary" :disabled="goodsListSave.length === 0" @click="confirmImport">导 入</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -172,12 +222,182 @@ import { defaultDate } from "@/util/date";
|
|
|
import { IntegerFormat } from "@/util/validate";
|
|
|
import { customerParameter } from "@/enums/management-type";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
+import {customerList} from "@/api/basicData/customerInformation";
|
|
|
+import { detail as companyDetail } from "@/api/basicData/customerInformation"
|
|
|
+import {getUser as nameUser} from "@/api/system/user"
|
|
|
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
|
data() {
|
|
|
return {
|
|
|
- switchDialog: false,
|
|
|
+ tabsType:'first',
|
|
|
+ procureData:[], // 待采购数据
|
|
|
+ // 待采购配置
|
|
|
+ procureOption:{
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 8,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ menuWidth: "100",
|
|
|
+ headerAlign: "center",
|
|
|
+ searchIcon: false,
|
|
|
+ searchIndex: 2,
|
|
|
+ column: [{
|
|
|
+ label: "销售单号",
|
|
|
+ prop: "orderNo",
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "交货日期",
|
|
|
+ prop: "plannedDeliveryDate",
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "公司主体",
|
|
|
+ prop: "belongToCorpName",
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "公司主体",
|
|
|
+ prop: "belongToCorpId",
|
|
|
+ hide:true,
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUser",
|
|
|
+ hide:true,
|
|
|
+ overHidden: true
|
|
|
+ },{
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ overHidden: true
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ procureVisible:false, // 待采购弹窗
|
|
|
+ procurelistData:[], // 待采购弹窗列表数据
|
|
|
+ // 待采购弹窗待配置
|
|
|
+ procurelistOption: {
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 8,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ menuWidth: "100",
|
|
|
+ headerAlign: "center",
|
|
|
+ searchIcon: false,
|
|
|
+ searchIndex: 2,
|
|
|
+ tip: false,
|
|
|
+ column: [{
|
|
|
+ label: "销售单号",
|
|
|
+ prop: "billNo",
|
|
|
+ searchSpan: 8,
|
|
|
+ searchOrder: 1,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "销售日期",
|
|
|
+ prop: "businesDate",
|
|
|
+ searchProp: "businesDateList",
|
|
|
+ width: 100,
|
|
|
+ type: "date",
|
|
|
+ searchSpan: 8,
|
|
|
+ searchRange: true,
|
|
|
+ searchDefaultTime: ["00:00:00", "23:59:59"],
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "供应商",
|
|
|
+ prop: "corpName",
|
|
|
+ searchSpan: 8,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "交货日期",
|
|
|
+ prop: "plannedDeliveryDate",
|
|
|
+ searchProp: "plannedDeliveryDateList",
|
|
|
+ width: 100,
|
|
|
+ type: "date",
|
|
|
+ searchSpan: 8,
|
|
|
+ searchRange: true,
|
|
|
+ searchDefaultTime: ["00:00:00", "23:59:59"],
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "采购员",
|
|
|
+ prop: "carry",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "cname",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品编号",
|
|
|
+ prop: "code",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品类别",
|
|
|
+ prop: "priceCategory",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品型号",
|
|
|
+ prop: "itemType",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "数量",
|
|
|
+ prop: "orderQuantity"
|
|
|
+ }, {
|
|
|
+ label: "已采购数",
|
|
|
+ prop: "purchaseQuantity",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "待采数",
|
|
|
+ prop: "actualQuantity",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "螺纹",
|
|
|
+ prop: "remarksOne",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "介质",
|
|
|
+ prop: "customTwo",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "颜色",
|
|
|
+ prop: "customThree",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "电压",
|
|
|
+ prop: "customFour",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "显示全部",
|
|
|
+ prop: "showAll",
|
|
|
+ searchSpan: 8,
|
|
|
+ searchOrder: 2,
|
|
|
+ overHidden: true,
|
|
|
+ type: "select",
|
|
|
+ clearable: false,
|
|
|
+ hide: true,
|
|
|
+ showColumn: false,
|
|
|
+ dicData: [{
|
|
|
+ label: '需采购',
|
|
|
+ value: 0
|
|
|
+ }, {
|
|
|
+ label: '已采购',
|
|
|
+ value: 1
|
|
|
+ }],
|
|
|
+ searchValue: 0
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ switchDialog: false,
|
|
|
search: {
|
|
|
// businesDate: defaultDate()
|
|
|
// businesDate: ''
|
|
|
@@ -235,6 +455,7 @@ export default {
|
|
|
searchIcon: false,
|
|
|
searchIndex: 2,
|
|
|
tip: false,
|
|
|
+ selection:true,
|
|
|
column: [{
|
|
|
label: "销售单号",
|
|
|
prop: "billNo",
|
|
|
@@ -343,11 +564,14 @@ export default {
|
|
|
}]
|
|
|
},
|
|
|
dialogVisible: false,
|
|
|
- itemOption: {
|
|
|
+ itemOption:{},
|
|
|
+ itemOptionList: {
|
|
|
align: "center",
|
|
|
- header: false,
|
|
|
+ header: true,
|
|
|
+ addBtn:false,
|
|
|
border: true,
|
|
|
menu: false,
|
|
|
+ refreshBtn:false,
|
|
|
column: [
|
|
|
{
|
|
|
label: "产品类别",
|
|
|
@@ -420,6 +644,7 @@ export default {
|
|
|
async created() {
|
|
|
this.option = await this.getColumnData(this.getColumnName(2), option);
|
|
|
this.dialogOption = await this.getColumnData(this.getColumnName(2.1), this.dialogOptionList);
|
|
|
+ this.itemOption = await this.getColumnData(this.getColumnName(2.2), this.itemOptionList);
|
|
|
this.getWorkDicts("payment_term").then(res => {
|
|
|
this.findObject(this.option.column, "paymentType").dicData = res.data.data;
|
|
|
});
|
|
|
@@ -427,6 +652,7 @@ export default {
|
|
|
this.findObject(this.option.column, "createUser").dicData = res.data.data;
|
|
|
});
|
|
|
this.option.height = window.innerHeight - 210;
|
|
|
+ this.listBYStatusfun() // 获取待采购数据
|
|
|
},
|
|
|
filters: {
|
|
|
IntegerFormat(num) {
|
|
|
@@ -444,6 +670,29 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取待采购数据
|
|
|
+ listBYStatusfun(){
|
|
|
+ listBYStatus().then(res => {
|
|
|
+ for (let item of res.data.data) {
|
|
|
+ // 公司
|
|
|
+ companyDetail(item.belongToCorpId).then(re=>{
|
|
|
+ item.belongToCorpName = re.data.data.cname
|
|
|
+ })
|
|
|
+ // 用户
|
|
|
+ nameUser(item.createUser).then(re=>{
|
|
|
+ item.createUserName = re.data.data.name
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.procureData = res.data.data
|
|
|
+ this.treeData = res.data.data
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取待采购弹窗列表数据
|
|
|
+ procureViewfun(row){
|
|
|
+ this.procurelistData = []
|
|
|
+ this.procureOnLoad(row.id)
|
|
|
+ this.procureVisible = true;
|
|
|
+ },
|
|
|
outExport() {
|
|
|
let config = { params: { ...this.params } }
|
|
|
if (config.params) {
|
|
|
@@ -508,6 +757,10 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
+ // 采购任务弹窗增加多选
|
|
|
+ dialogSelectionChange(list){
|
|
|
+ this.goodsListSave = list
|
|
|
+ },
|
|
|
//行展开数据
|
|
|
expandChange(row) {
|
|
|
if (!row.itemData) {
|
|
|
@@ -581,9 +834,11 @@ export default {
|
|
|
this.dialogPage.total = 0
|
|
|
}
|
|
|
},
|
|
|
+ // 采购任务弹窗列表选择按钮
|
|
|
importStagList(row, index) {
|
|
|
this.goodsListSave.push(row);
|
|
|
},
|
|
|
+ // 采购任务弹窗列表刷新
|
|
|
refreshChangeTwo() {
|
|
|
this.dialogOnLoad(this.page);
|
|
|
},
|
|
|
@@ -652,10 +907,9 @@ export default {
|
|
|
this.detailData = {
|
|
|
form: res.data.data
|
|
|
};
|
|
|
-
|
|
|
-
|
|
|
loading.close()
|
|
|
- this.dialogVisible = false
|
|
|
+ this.procureVisible = false // 待采购弹窗关闭
|
|
|
+ this.dialogVisible = false // 采购任务弹窗关闭
|
|
|
this.activeName = "searchList"
|
|
|
setTimeout(() => {
|
|
|
this.show = false;
|
|
|
@@ -664,6 +918,7 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
},
|
|
|
+ // 采购任务列表获取数据
|
|
|
dialogOnLoad(page, params) {
|
|
|
this.dialogLoading = true;
|
|
|
params = {
|
|
|
@@ -680,6 +935,18 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 待采购列表获取数据
|
|
|
+ procureOnLoad(id) {
|
|
|
+ let params = {
|
|
|
+ size: 20,
|
|
|
+ current: 1,
|
|
|
+ showAll: 0,
|
|
|
+ pid:id
|
|
|
+ }
|
|
|
+ listXS(params).then(res => {
|
|
|
+ this.procurelistData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
onLoad(page, params) {
|
|
|
if (this.search.businesDate && this.search.businesDate.length > 0) {
|
|
|
params = {
|