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.采购入库单流水号
|
||||
|
||||
Reference in New Issue
Block a user