lx
This commit is contained in:
@@ -437,7 +437,7 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同名称" prop="合同名称">
|
||||
<el-form-item label="合同名称" prop="contract">
|
||||
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Contract"
|
||||
@@ -448,7 +448,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="仓库名称">
|
||||
<el-form-item label="仓库名称" prop="house">
|
||||
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Inventory"
|
||||
@@ -461,7 +461,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入库日期" prop="入库日期">
|
||||
<el-form-item label="入库日期" prop="inboundDay">
|
||||
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" style="width: 200px" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -523,14 +523,14 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitCard">确定</el-button>
|
||||
<el-button type="primary" size="small" @click="submitCard('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogVisible2" title="修改采购入库单" center style="min-height: 300px" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同名称" prop="合同名称">
|
||||
<el-form-item label="合同名称" prop="contract">
|
||||
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Contract"
|
||||
@@ -541,7 +541,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库名称" prop="仓库名称">
|
||||
<el-form-item label="仓库名称" prop="house">
|
||||
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in Inventory"
|
||||
@@ -554,7 +554,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入库日期" prop="入库日期">
|
||||
<el-form-item label="入库日期" prop="inboundDay">
|
||||
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" style="width: 200px" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -616,7 +616,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitInboundCardInfor">确定</el-button>
|
||||
<el-button type="primary" size="small" @click="submitInboundCardInfor('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -668,14 +668,7 @@ export default {
|
||||
rules: { // 表单验证规则
|
||||
contract: [{ required: true, message: '请选择合同', trigger: 'blur' }],
|
||||
house: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
|
||||
inboundDay: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
|
||||
arrive: [{ required: true, message: '请输入到货单号', trigger: 'blur' }],
|
||||
affair: [{ required: true, message: '请输入业务号', trigger: 'blur' }],
|
||||
affairPeople: [{ required: true, message: '请选择业务员', trigger: 'blur' }],
|
||||
affirType: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
|
||||
purchaseType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
|
||||
inboundType: [{ required: true, message: '请输入入库类别', trigger: 'blur' }],
|
||||
note: [{ required: true, message: '请输入备注', trigger: 'blur' }]
|
||||
inboundDay: [{ required: true, message: '请输入入库日期', trigger: 'blur' }]
|
||||
},
|
||||
nameGroup: [],
|
||||
modelGroup: [],
|
||||
@@ -787,8 +780,8 @@ export default {
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
// 增加入库单
|
||||
submitCard() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
submitCard(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addInboundCard(this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -862,13 +855,17 @@ export default {
|
||||
this.form.inboundType = row.入库类别
|
||||
this.form.note = row.备注
|
||||
},
|
||||
submitInboundCardInfor() {
|
||||
editInboundCard(this.DetailNumber, this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogVisible2 = false
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
submitInboundCardInfor(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
editInboundCard(this.DetailNumber, this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogVisible2 = false
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -883,7 +880,6 @@ export default {
|
||||
this.tableData4 = data
|
||||
})
|
||||
},
|
||||
|
||||
// 删除领料单
|
||||
dropCard(row) {
|
||||
this.CardNumber = row.采购入库单流水号
|
||||
|
||||
@@ -535,7 +535,6 @@ export default {
|
||||
},
|
||||
// 执行修改货位
|
||||
LocateEdit() {
|
||||
console.log(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量)
|
||||
alterLocate(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<el-table-column label="操作" align="center" width="280" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.离线合同状态) === 1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">导出</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -300,12 +300,77 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisibleExport" center style="min-height: 300px" width="60%">
|
||||
<el-card>
|
||||
<div id="print">
|
||||
<div style="text-align: center">
|
||||
<h2>仓 库 补 投 单</h2>
|
||||
<hr>
|
||||
<table class="tgClass" style="table-layout: fixed; width: 820px;margin: auto">
|
||||
<colgroup>
|
||||
<col style="width: 120px">
|
||||
<col style="width: 250px">
|
||||
<col style="width: 110px">
|
||||
<col style="width: 100px">
|
||||
<col style="width: 120px">
|
||||
<col style="width: 120px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="tg-s268">补投单编号:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[0] }}</td>
|
||||
<td class="tg-0lax">姓名:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[1] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-0lax">补投时间:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[2] }}</td>
|
||||
<td class="tg-0lax">仓库名称:</td>
|
||||
<td class="tg-0lax" style="text-align: left">{{ inbondCard[3] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<table class="tg" style="table-layout: fixed; width: 820px; margin: auto">
|
||||
<colgroup>
|
||||
<col style="width: 74px">
|
||||
<col style="width: 78px">
|
||||
<col style="width: 84px">
|
||||
<col style="width: 88px">
|
||||
<col style="width: 94px">
|
||||
<col style="width: 80px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th class="tg-c3ow">项目名称</th>
|
||||
<th class="tg-c3ow">机床图号</th>
|
||||
<th class="tg-c3ow">组号</th>
|
||||
<th class="tg-c3ow">名称</th>
|
||||
<th class="tg-c3ow">数量</th>
|
||||
<th class="tg-c3ow">类型</th>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData4" :key="index">
|
||||
<td class="tg-c3ow">{{ list.项目名称 }}</td>
|
||||
<td class="tg-c3ow">{{ list.机床图号 }}</td>
|
||||
<td class="tg-c3ow">{{ list.组号 }}</td>
|
||||
<td class="tg-c3ow">{{ list.名称 }}</td>
|
||||
<td class="tg-c3ow">{{ list.数量 }}</td>
|
||||
<td class="tg-c3ow">{{ list.类型名称 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisibleExport=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="printCard">打印</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse, addCardDetail, searchCardDetail, deleteReplacementCard, deleteCardDetail } from '@/api/Inventory/PartsReplacement'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -351,7 +416,9 @@ export default {
|
||||
locateGroup: [],
|
||||
partType: [],
|
||||
reasonGroup: [],
|
||||
cardNumber: ''
|
||||
cardNumber: '',
|
||||
inbondCard: [], // 补投单
|
||||
dialogVisibleExport: false // 导出表单
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -473,8 +540,6 @@ export default {
|
||||
}
|
||||
searchAlterRecord(this.pageCurrent, this.pageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
console.log(response.data.rows)
|
||||
console.log(this.tableData1, 112233)
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
@@ -639,11 +704,36 @@ export default {
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
doneRequestCard(row) {
|
||||
this.dialogVisibleExport = true
|
||||
this.cardNumber = row.补投单流水号
|
||||
this.inbondCard[0] = row.补投单编号
|
||||
this.inbondCard[1] = row.姓名
|
||||
this.inbondCard[2] = row.补投时间.split(' ')[0]
|
||||
this.inbondCard[3] = row.仓库名称
|
||||
searchCardDetail(this.cardNumber).then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
// 打印请购单
|
||||
printCard() {
|
||||
const htmlNode = $('#print').html() // #print为需要打印的dom节点id
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().show()
|
||||
printNode.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user