This commit is contained in:
zhangdingyu
2019-10-16 16:44:19 +08:00
parent 991b04b903
commit d4564c84f9
2 changed files with 124 additions and 33 deletions

View File

@@ -353,3 +353,37 @@ export function searchMerge(num) {
} }
}) })
} }
export function getPerson(num) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: 'select * from dbo.人事档案管理_人员名单 inner join dbo.菜单系统模块_人员与角色 ' +
'on 人事档案管理_人员名单.人员编号=菜单系统模块_人员与角色.人员编号 ' +
'where 角色编号=3 or 角色编号=2'
}
})
}
export function tiaozheng1(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购件入库_创建询价单_调整采购任务_循环执行',
param: '人员编号=' + num1 + '&标准件和外购件流水号组=' + num2
}
})
}
export function tiaozheng2(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购件入库_创建询价单_调整采购任务_基本件_循环执行',
param: '人员编号=' + num1 + '&基本件流水号组=' + num2
}
})
}

View File

@@ -77,18 +77,21 @@
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/> <el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<span>物料型号:</span> <span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/> <el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
<el-button <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent11=1;pageSize11=100;total11=0;searchTable11()">查询</el-button>
type="success" <el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价物料清单</el-button>
size="small" <el-popover v-model="visible" title="调整采购任务" placement="top" width="180">
icon="el-icon-search" <div style="text-align: right; margin: 0">
style="margin-left: 10px" <el-select v-model="PersonValue" style="width:150px" placeholder="人员" size="small" filterable clearable>
@click="pageCurrent11=1;pageSize11=100;total11=0;searchTable11()">查询</el-button> <el-option
<el-button v-for="item in Person"
type="warning" :key="item.value"
size="small" :label="item.label"
icon="el-icon-download" :value="item.value"/>
style="margin-left: 10px" </el-select>
@click="exportUninquirySheet">导出未询价物料清单</el-button> <el-button type="primary" size="mini" @click="visible = false;tiaozheng1()">确定</el-button>
</div>
<el-button slot="reference" type="warning" size="small" plain style="margin-left: 2px">调整采购任务</el-button>
</el-popover>
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table <el-table
@@ -275,18 +278,21 @@
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/> <el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
<span>零件规格:</span> <span>零件规格:</span>
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/> <el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
<el-button <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent12=1;pageSize12=100;total12=0;searchTable12()">查询</el-button>
type="success" <el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价物料清单</el-button>
size="small" <el-popover v-model="visible2" title="调整采购任务" placement="top" width="180">
icon="el-icon-search" <div style="text-align: right; margin: 0">
style="margin-left: 10px" <el-select v-model="PersonValue" style="width:150px" placeholder="人员" size="small" filterable clearable>
@click="pageCurrent12=1;pageSize12=100;total12=0;searchTable12()">查询</el-button> <el-option
<el-button v-for="item in Person"
type="warning" :key="item.value"
size="small" :label="item.label"
icon="el-icon-download" :value="item.value"/>
style="margin-left: 10px" </el-select>
@click="exportUninquirySheet">导出未询价物料清单</el-button> <el-button type="primary" size="mini" @click="visible2 = false;tiaozheng2()">确定</el-button>
</div>
<el-button slot="reference" type="warning" size="small" plain style="margin-left: 2px">调整采购任务</el-button>
</el-popover>
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table <el-table
@@ -298,7 +304,7 @@
height="500px" height="500px"
size="mini" size="mini"
@selection-change="handleSelectionChange2"> @selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/> <el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<!--<el-table-column label="操作" align="center" width="100" fixed="left">--> <!--<el-table-column label="操作" align="center" width="100" fixed="left">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="partChange(scope.row)">零件变更</el-button>--> <!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="partChange(scope.row)">零件变更</el-button>-->
@@ -877,7 +883,7 @@
</template> </template>
<script> <script>
import { getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet, import { tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder, createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge } from '@/api/PurchasingCenter/CreateInquirySheet' submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -889,6 +895,12 @@ export default {
name: '', // 创建询价单 name: '', // 创建询价单
data() { data() {
return { return {
标准件和外购件流水号: [],
基本件流水号: [],
visible: false,
visible2: false,
Person: [],
PersonValue: '',
supplierNames: [], // 供应商下拉框 supplierNames: [], // 供应商下拉框
switchValue: false, // 物料变更列显示开关 switchValue: false, // 物料变更列显示开关
source: [ source: [
@@ -1052,10 +1064,12 @@ export default {
computed: { computed: {
...mapGetters([ ...mapGetters([
'name', 'name',
'token',
'id' // 人员编号 'id' // 人员编号
]) ])
}, },
created() { created() {
this.getPerson()
this.fetchData() this.fetchData()
this.searchTable11() // 查表1 this.searchTable11() // 查表1
this.searchTable2() // 查表2 this.searchTable2() // 查表2
@@ -1064,10 +1078,55 @@ export default {
this.initDirection() this.initDirection()
}, },
methods: { methods: {
tiaozheng1() {
if (this.标准件和外购件流水号.length !== 0) {
if (this.PersonValue) {
tiaozheng1(this.PersonValue, this.标准件和外购件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('调整成功')
this.searchTable11()
} else {
this.$message.warning('调整失败')
}
})
} else {
this.$message.warning('请选择人员')
}
} else {
this.$message.warning('请选择物料')
}
},
tiaozheng2() {
if (this.基本件流水号.length !== 0) {
if (this.PersonValue) {
tiaozheng2(this.PersonValue, this.基本件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('调整成功')
this.searchTable12()
} else {
this.$message.warning('调整失败')
}
})
} else {
this.$message.warning('请选择人员')
}
} else {
this.$message.warning('请选择物料')
}
},
getPerson() {
getPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Person.push({
value: response.data[i].人员编号,
label: response.data[i].姓名
})
}
})
},
initDirection() { initDirection() {
const direction = this.$getDirection() const direction = this.$getDirection()
direction.on('keyup', function(e, val) { direction.on('keyup', function(e, val) {
console.log(val)
if (e.keyCode === 39) { if (e.keyCode === 39) {
direction.next() direction.next()
} }
@@ -1162,7 +1221,6 @@ export default {
} }
}).then(res => { }).then(res => {
this.machines1 = res.data this.machines1 = res.data
console.log(this.machines1)
}) })
}, },
async searchUnBuyPartNumber() { async searchUnBuyPartNumber() {
@@ -1364,7 +1422,6 @@ export default {
this.dialogVisible4 = true this.dialogVisible4 = true
}, },
// cancelUseInventory(row) { // 取消使用滞货 // cancelUseInventory(row) { // 取消使用滞货
// console.log(row)
// this.backlogMaterialNum = row.物料流水号 // this.backlogMaterialNum = row.物料流水号
// this.backlogGroupPartNum = row.组件零件流水号 // this.backlogGroupPartNum = row.组件零件流水号
// this.cancelNum = row.使用滞货数量 // this.cancelNum = row.使用滞货数量
@@ -1373,7 +1430,6 @@ export default {
// cancelButtonText: '取消', // cancelButtonText: '取消',
// type: 'warning' // type: 'warning'
// }).then(() => { // }).then(() => {
// console.log(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum)
// cancelUseInventory(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum).then(response => { // cancelUseInventory(this.backlogMaterialNum, this.cancelNum, this.backlogGroupPartNum).then(response => {
// if (response.data[0].result === '1') { // if (response.data[0].result === '1') {
// this.searchTable11() // this.searchTable11()
@@ -1675,7 +1731,6 @@ export default {
printNode.remove() printNode.remove()
}) })
}).catch(res => { }).catch(res => {
console.log(res)
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消操作' message: '已取消操作'
@@ -1724,7 +1779,6 @@ export default {
} }
}) })
}).catch(res => { }).catch(res => {
console.log(res)
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消操作' message: '已取消操作'
@@ -1734,17 +1788,21 @@ export default {
handleSelectionChange1(val) { // 标准件和外购件多选 handleSelectionChange1(val) { // 标准件和外购件多选
this.groupPartNum = [] this.groupPartNum = []
this.allNum = [] this.allNum = []
this.标准件和外购件流水号 = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
this.groupPartNum[i] = val[i].组件零件流水号 this.groupPartNum[i] = val[i].组件零件流水号
this.allNum[i] = val[i].待询价数量 this.allNum[i] = val[i].待询价数量
this.标准件和外购件流水号[i] = val[i].标准件和外购件流水号
} }
}, },
handleSelectionChange2(val) { // 基本件多选 handleSelectionChange2(val) { // 基本件多选
this.groupPartBasicNum = [] this.groupPartBasicNum = []
this.allNum = [] this.allNum = []
this.基本件流水号 = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
this.groupPartBasicNum[i] = val[i].组件零件基本件流水号 this.groupPartBasicNum[i] = val[i].组件零件基本件流水号
this.allNum[i] = val[i].零件数量 this.allNum[i] = val[i].零件数量
this.基本件流水号[i] = val[i].基本件流水号
} }
}, },
addInquirySheet() { // 追加物料 addInquirySheet() { // 追加物料
@@ -1894,7 +1952,6 @@ export default {
}, },
partChange(row) { // 零件变更 基本件 partChange(row) { // 零件变更 基本件
this.$message('没有基本件的标准库') this.$message('没有基本件的标准库')
console.log(row)
}, },
searchMaterial() { searchMaterial() {
if (this.materialName0 || this.materialSpec0 || this.materialModel0) { if (this.materialName0 || this.materialSpec0 || this.materialModel0) {