This commit is contained in:
lixin
2018-12-30 01:57:29 +08:00
4 changed files with 25 additions and 12 deletions

View File

@@ -49,3 +49,14 @@ export function handlechange(Number, code) {
} }
}) })
} }
export function change(Number, code, num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_备料到货更改',
param: '工序流水号组=' + Number + '&工作者考勤编号=' + code + '&工艺计划流水号组=' + num
}
})
}

View File

@@ -60,14 +60,14 @@ export function searchTable3(num) {
} }
}) })
} }
export function submitApproval(num, num1, num2) { export function submitApproval(num, num1, num2, num3) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '采购管理_合同审批_修改数据', name: '采购管理_合同审批_修改数据',
param: '采购合同流水号=' + num + '&审批情况流水号=' + num1 + '&未通过原因=' + num2 param: '采购合同流水号=' + num + '&请购单流水号=' + num3 + '&审批情况流水号=' + num1 + '&未通过原因=' + num2
} }
}) })
} }

View File

@@ -7,6 +7,7 @@
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button> <el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox> <el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button> <el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>
</el-row> </el-row>
</el-card> </el-card>
@@ -55,10 +56,12 @@
</template> </template>
<script> <script>
import { searchtable, searchtable2, edit, handlechange } from '@/api/ManufacturingCenter/MaterialArrivalManagement' import { searchtable, searchtable2, change } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
export default { export default {
data() { data() {
return { return {
bianliang1: [],
bianliang2: [],
num: 0, num: 0,
arrest: [], arrest: [],
all: false, all: false,
@@ -115,15 +118,12 @@ export default {
this.$message.warning('请选择零件') this.$message.warning('请选择零件')
} else { } else {
for (let i = 0; i < this.arrest.length; i++) { for (let i = 0; i < this.arrest.length; i++) {
edit(this.arrest[i].工艺计划流水号).then(() => { this.bianliang1.push(this.arrest[i].工艺计划流水号)
handlechange(this.arrest[i].工序流水号, '0000').then(response => { this.bianliang2.push(this.arrest[i].工序流水号)
this.num = this.num + response.data[0].result
})
})
if (this.num === this.arrest.length) {
this.searchTable()
}
} }
change(this.bianliang2, '0000', this.bianliang1).then(() => {
this.searchTable()
})
} }
}, },
// 分页 // 分页

View File

@@ -303,6 +303,7 @@ export default {
TotalAmount1: '', TotalAmount1: '',
RMB1: '', RMB1: '',
total1: 0, total1: 0,
QGNUM: '',
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10, pageSize1: 10,
tableData1: [], tableData1: [],
@@ -398,6 +399,7 @@ export default {
console.log(row) console.log(row)
this.dialogVisible3 = true this.dialogVisible3 = true
this.ProcurementContractNum = row.采购合同流水号 this.ProcurementContractNum = row.采购合同流水号
this.QGNUM = row.请购单流水号
}, },
selectChange() { selectChange() {
if (this.form2.审批是否通过 === 2) { if (this.form2.审批是否通过 === 2) {
@@ -409,7 +411,7 @@ export default {
submitApproval(formName) { submitApproval(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因).then(response => { submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因, this.QGNUM).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('审批成功') this.$message.success('审批成功')
this.dialogVisible3 = false this.dialogVisible3 = false