151 lines
3.8 KiB
Plaintext
151 lines
3.8 KiB
Plaintext
<template>
|
|
<!-- wms检验单修改抽检数量 -->
|
|
<el-container style="margin-top: 10px;" v-loading="loading">
|
|
<!-- 添加或修改参数配置对话框 -->
|
|
<el-form ref="form" :model="form" label-width="110px" :rules="rules" align="left" style="width: 100%;">
|
|
<!-- 第一行 -->
|
|
<el-row>
|
|
<!-- <el-col :span="6">
|
|
<el-form-item label="id" prop="id">
|
|
<el-input v-model="form.id" style="width: 95%" placeholder="" size="small" disabled/>
|
|
</el-form-item>
|
|
</el-col> -->
|
|
<el-col :span="6">
|
|
<el-form-item label="实发数量" prop="doneQty">
|
|
<el-input v-model="form.doneQty" placeholder="请输入内容"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="备注" prop="msg">
|
|
<el-input type="textarea" v-model="form.msg" placeholder="请输入内容"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<!-- 第二行 -->
|
|
<!-- 表单按钮 -->
|
|
<el-row style="margin-top:20px">
|
|
<el-col :span="24">
|
|
<el-form-item style="float: right;margin-right: 20px">
|
|
<el-button type="primary" @click="submitForm" v-loading="saveLoading">确 定</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
|
|
</el-container>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {},
|
|
props: {
|
|
layerid: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
row: {
|
|
type: Array,
|
|
default: undefined
|
|
},
|
|
currentData: {
|
|
type: Object,
|
|
default: undefined
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
form: {
|
|
createTime: ''
|
|
},
|
|
rules: {},
|
|
saveLoading: false
|
|
}
|
|
},
|
|
async mounted() {
|
|
|
|
},
|
|
created() {
|
|
console.log(this.row)
|
|
console.log(this.currentData)
|
|
},
|
|
methods: {
|
|
//保存按钮
|
|
submitForm() {
|
|
|
|
if (this.row==null) {
|
|
let params = {
|
|
materialBar:this.currentData.materialBar,
|
|
pickBillNumber: this.currentData.pickBillNumber,
|
|
remarks: this.form.msg,
|
|
doneQty: this.form.doneQty
|
|
}
|
|
this.$pickBill.updateDoneQtyByBar(params).then(data => {
|
|
if (data.data.code == 200) {
|
|
this.$message.success('实发数量更新成功')
|
|
this.$parent.getList()
|
|
this.$layer.close(this.layerid)
|
|
} else {
|
|
this.$message.error('实发数量更新失败')
|
|
this.$layer.close(this.layerid)
|
|
}
|
|
})
|
|
}
|
|
if (this.currentData==null) {
|
|
let params = {
|
|
id: this.row[0].subId,
|
|
remarks: this.form.msg,
|
|
doneQty: this.form.doneQty
|
|
}
|
|
this.$pickBill.updateDoneQty(params).then(data => {
|
|
if (data.data.code == 200) {
|
|
this.$message.success('实发数量更新成功')
|
|
this.$parent.getList()
|
|
this.$layer.close(this.layerid)
|
|
} else {
|
|
this.$message.error('实发数量更新失败')
|
|
this.$layer.close(this.layerid)
|
|
}
|
|
})
|
|
}
|
|
},
|
|
//取消按钮
|
|
cancel() {
|
|
this.reset()
|
|
this.$layer.close(this.layerid)
|
|
},
|
|
//重置表单
|
|
reset() {
|
|
this.form = {
|
|
id: '',
|
|
arriveBillNumber: '',
|
|
inspectBillNumber: '',
|
|
inspectTotalQty: '',
|
|
spotCheckQty: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.el-form-item {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
> > > .el-table__body tr.current-row > td {
|
|
background-color: #8ac1ff !important;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.el-table > > > tbody tr:hover > td {
|
|
background-color: #8ac1ff !important;
|
|
}
|
|
|
|
.input_inner /deep/ .el-input__inner {
|
|
background-color: white !important;
|
|
}
|
|
</style>
|