|
|
|
@ -13,25 +13,28 @@
|
|
|
|
|
:model="inputQuery"
|
|
|
|
|
:rules="formRules"
|
|
|
|
|
ref="dataForm"
|
|
|
|
|
label-width="110px"
|
|
|
|
|
label-width="150px"
|
|
|
|
|
style="padding-top: 40px"
|
|
|
|
|
>
|
|
|
|
|
<el-card style="margin-top: -30px">
|
|
|
|
|
<!--<el-row>-->
|
|
|
|
|
<!-- <el-col :span="20">-->
|
|
|
|
|
<!-- <el-form-item prop="code" label="发票码:">-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- id="inputer"-->
|
|
|
|
|
<!-- placeholder="请输入发票码"-->
|
|
|
|
|
<!-- type="tel"-->
|
|
|
|
|
<!-- :disabled="true"-->
|
|
|
|
|
<!-- ></el-input>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!--</el-row>-->
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item prop="code" label="请扫入发票二维码:">
|
|
|
|
|
<el-input
|
|
|
|
|
id="inputer"
|
|
|
|
|
@focus="getInputFocus($event)"
|
|
|
|
|
@keypress.enter.native="enterKey($event)"
|
|
|
|
|
ref="inputRef"
|
|
|
|
|
style="ime-mode: disabled"
|
|
|
|
|
type="password"
|
|
|
|
|
v-model="inputQuery.code"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="11">
|
|
|
|
|
<el-form-item label="机械编码:" prop="machineNo">
|
|
|
|
|
<el-form-item label="机器编码:" prop="machineNo">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="inputQuery.machineNo"
|
|
|
|
|
auto-complete="off"
|
|
|
|
@ -205,6 +208,12 @@
|
|
|
|
|
width="100"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="金额"
|
|
|
|
|
prop="amount"
|
|
|
|
|
width="100"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="生产日期"
|
|
|
|
|
prop="productDate"
|
|
|
|
@ -258,7 +267,7 @@ import {
|
|
|
|
|
insertInvoice,
|
|
|
|
|
updateOrder,
|
|
|
|
|
filterBizOrderList,
|
|
|
|
|
updateorderBiz,
|
|
|
|
|
updateorderBiz, parseInvoice,
|
|
|
|
|
} from "@/api/inout/orderDetailBiz";
|
|
|
|
|
import AcceptOrder from "@/views/inout/DialogReviewOrder";
|
|
|
|
|
import DialogInvoice from "@/views/inout/DialogInvoice";
|
|
|
|
@ -341,12 +350,12 @@ export default {
|
|
|
|
|
1: "发票登记",
|
|
|
|
|
},
|
|
|
|
|
formRules: {
|
|
|
|
|
machineNo: [
|
|
|
|
|
{required: true, message: "请输入机械编码", trigger: "blur"},
|
|
|
|
|
],
|
|
|
|
|
invoiceCode: [
|
|
|
|
|
{required: true, message: "请输入发票代码", trigger: "blur"},
|
|
|
|
|
],
|
|
|
|
|
// machineNo: [
|
|
|
|
|
// {required: true, message: "请输入机械编码", trigger: "blur"},
|
|
|
|
|
// ],
|
|
|
|
|
// invoiceCode: [
|
|
|
|
|
// {required: true, message: "请输入发票代码", trigger: "blur"},
|
|
|
|
|
// ],
|
|
|
|
|
invoiceEncode: [
|
|
|
|
|
{required: true, message: "请输入发票编码", trigger: "blur"},
|
|
|
|
|
],
|
|
|
|
@ -479,14 +488,14 @@ export default {
|
|
|
|
|
this.$message.error("请选择要登记的物资! ");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (this.$isBlank(this.inputQuery.machineNo)) {
|
|
|
|
|
this.$message.error("机械编码不能为空!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.$isBlank(this.inputQuery.invoiceCode)) {
|
|
|
|
|
this.$message.error("发票代码不能为空!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (this.$isBlank(this.inputQuery.machineNo)) {
|
|
|
|
|
// this.$message.error("机械编码不能为空!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (this.$isBlank(this.inputQuery.invoiceCode)) {
|
|
|
|
|
// this.$message.error("发票代码不能为空!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (this.$isBlank(this.inputQuery.invoiceEncode)) {
|
|
|
|
|
this.$message.error("发票编码不能为空!");
|
|
|
|
|
return;
|
|
|
|
@ -500,6 +509,14 @@ export default {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.inputQuery.list = this.invoiceRow;
|
|
|
|
|
let mount=0;
|
|
|
|
|
for(var i=0;i<this.invoiceRow.length;i++){
|
|
|
|
|
mount+=this.invoiceRow[i].amount
|
|
|
|
|
}
|
|
|
|
|
if(mount != this.inputQuery.price){
|
|
|
|
|
this.$message.error("价格不匹配!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
insertInvoice(this.inputQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
@ -518,6 +535,23 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getInputFocus(event) {
|
|
|
|
|
event.currentTarget.select();
|
|
|
|
|
},
|
|
|
|
|
enterKey(){
|
|
|
|
|
let param={
|
|
|
|
|
code :this.inputQuery.code
|
|
|
|
|
}
|
|
|
|
|
parseInvoice(param)
|
|
|
|
|
.then((res)=>{
|
|
|
|
|
if(res.code == 20000){
|
|
|
|
|
this.inputQuery=res.data;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
uploadHandleError() {
|
|
|
|
|
},
|
|
|
|
|
uploadHandleSuccess(response, file, fileList) {
|
|
|
|
|