发票机器编码非必填

ywj_dev
anthonywj 2 years ago
parent d8bb844c13
commit 21c2a7e8d5

@ -22,32 +22,32 @@
</el-col>
</el-row>
<el-row >
<el-row>
<el-col :span="11">
<el-form-item label="机械编码:" prop="machineNo">
<el-input v-model="inputQuery.machineNo" auto-complete="off" ></el-input>
<el-form-item label="机器编码:" prop="machineNo">
<el-input v-model="inputQuery.machineNo" auto-complete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="发票代码:" prop="invoiceCode">
<el-input v-model="inputQuery.invoiceCode" auto-complete="off" ></el-input>
<el-input v-model="inputQuery.invoiceCode" auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="发票编码:" prop="invoiceEncode">
<el-input v-model="inputQuery.invoiceEncode" auto-complete="off" ></el-input>
<el-form-item label="发票编码:" prop="invoiceEncode">
<el-input v-model="inputQuery.invoiceEncode" auto-complete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="发票价格:" prop="price">
<el-input v-model="inputQuery.price" auto-complete="off" ></el-input>
<el-input v-model="inputQuery.price" auto-complete="off"></el-input>
</el-form-item>
</el-col>
@ -67,7 +67,7 @@
<el-col :span="11">
<el-form-item label="备注:" prop="remark">
<el-input v-model="inputQuery.remark" auto-complete="off" ></el-input>
<el-input v-model="inputQuery.remark" auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -104,12 +104,13 @@
<el-col :span="11">
<el-form-item label="文件预览:">
<el-button type="success" size="mini" icon="search" v-if="this.inputQuery.licenseUrl!=null"
style="text-align:right" @click="showImgViewer" >
文件预览
</el-button>
<el-button type="success" size="mini" icon="search" v-if="this.inputQuery.licenseUrl!=null"
style="text-align:right" @click="showImgViewer">
文件预览
</el-button>
</el-form-item>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer"
:url-list="imgList"/>
</el-col>
@ -126,7 +127,7 @@ import store from "@/store";
import {insertCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert";
import {updateById} from '@/api/inout/orderDetailBiz'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import { previewImage } from '@/api/purchase/supCompany'
import {previewImage} from '@/api/purchase/supCompany'
export default {
@ -145,24 +146,24 @@ export default {
},
data() {
return {
imgList:[],
imgViewerVisible:false,
imgList: [],
imgViewerVisible: false,
BASE_URL: process.env.VUE_APP_BASE_API,
code: "",
formData: {
ggxh:"",
cpmctymc:"",
machineNo:"",
invoiceCode:"",
invoiceEncode:"",
price:"",
remark:"",
licenseUrl:""
ggxh: "",
cpmctymc: "",
machineNo: "",
invoiceCode: "",
invoiceEncode: "",
price: "",
remark: "",
licenseUrl: ""
},
formRules: {
machineNo: [
{required: true, message: "请输入机械编码", trigger: "blur"}
],
// machineNo: [
// {required: true, message: "", trigger: "blur"}
// ],
invoiceCode: [
{required: true, message: "请输入发票代码", trigger: "blur"}
],
@ -170,10 +171,10 @@ export default {
{required: true, message: "请输入发票编码", trigger: "blur"}
],
price: [
{required : true, message: "请输入发票价格", trigger:"blur"}
{required: true, message: "请输入发票价格", trigger: "blur"}
],
remark: [
{required : true, message: "请输入备注", trigger:"blur"}
{required: true, message: "请输入备注", trigger: "blur"}
],
},
loading: false,
@ -185,43 +186,43 @@ export default {
};
},
components: {
draggable,ElImageViewer
draggable, ElImageViewer
},
methods: {
submitUpload() {
this.$refs["dataForm"].validate(valid => {
if (valid) {
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;
}
if (this.$isBlank(this.inputQuery.price)) {
this.$message.error("发票价格不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.remark)) {
this.$message.error("备注不能为空!");
return;
}
updateById(this.inputQuery).then((res) => {
if (res.code == 20000) {
this.$message({
type: "success",
message: "修改成功!",
});
this.closeDialog();
}
})
if (valid) {
// 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;
}
if (this.$isBlank(this.inputQuery.price)) {
this.$message.error("发票价格不能为空!");
return;
}
if (this.$isBlank(this.inputQuery.remark)) {
this.$message.error("备注不能为空!");
return;
}
updateById(this.inputQuery).then((res) => {
if (res.code == 20000) {
this.$message({
type: "success",
message: "修改成功!",
});
this.closeDialog();
}
})
}
})
},
@ -267,7 +268,7 @@ export default {
//
// },
uploadHandleRemove(file, fileList) {
this.inputQuery.licenseUrl=null;
this.inputQuery.licenseUrl = null;
console.log(file, fileList);
},
uploadHandlePreview(file) {
@ -306,7 +307,7 @@ export default {
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
this.inputQuery.licenseUrl = response.data.name;
// this.onSubmit();
// this.onSubmit();
} else {
this.$message.error("文件上传失败:" + response.message);
}
@ -314,24 +315,28 @@ export default {
uploadHandleError() {
},
showImgViewer(){
showImgViewer() {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList=[];
previewImage({imageUrl:this.inputQuery.licenseUrl,certFileUrl:this.certFileUrl}).then(response => {
this.imgList = [];
previewImage({imageUrl: this.inputQuery.licenseUrl, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList=response.data;
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
const m = (e) => { e.preventDefault() };
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},

@ -31,7 +31,7 @@
<!--</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"
@ -338,9 +338,9 @@ export default {
1: "发票登记",
},
formRules: {
machineNo: [
{ required: true, message: "请输入机械编码", trigger: "blur" },
],
// machineNo: [
// { required: true, message: "", trigger: "blur" },
// ],
invoiceCode: [
{ required: true, message: "请输入发票代码", trigger: "blur" },
],
@ -476,10 +476,10 @@ export default {
this.$message.error("请选择要登记的物资! ");
return false;
}
if (this.$isBlank(this.inputQuery.machineNo)) {
this.$message.error("机械编码不能为空!");
return;
}
// if (this.$isBlank(this.inputQuery.machineNo)) {
// this.$message.error("");
// return;
// }
if (this.$isBlank(this.inputQuery.invoiceCode)) {
this.$message.error("发票代码不能为空!");
return;

@ -24,7 +24,7 @@
icon="search"
v-if="inputQuery.auditStatus == 0"
@click="onModifySubmit(0)"
>草稿保存
>草稿保存
</el-button>
<el-button
type="primary"
@ -32,7 +32,7 @@
icon="search"
v-if="inputQuery.auditStatus == 0 || inputQuery.auditStatus == 6"
@click="onModifySubmit(6)"
>提交审核
>提交审核
</el-button>
<el-button
@ -45,7 +45,7 @@
inputQuery.auditStatus == 2
"
@click="onModifySubmit(inputQuery.auditStatus)"
>提交审核
>提交审核
</el-button>
</div>
<el-row
@ -188,7 +188,7 @@
icon="search"
@click="selectCert"
style="text-align: right"
>选入资质证书
>选入资质证书
</el-button>
<el-button
@ -197,7 +197,7 @@
icon="search"
@click="addCert()"
style="text-align: right"
>添加资质证书
>添加资质证书
</el-button>
</div>
@ -245,13 +245,15 @@
type="text"
size="small"
@click.native="addCert(scope.row)"
>编辑</el-button
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native="showImgViewer(scope.row)"
>预览</el-button
>预览
</el-button
>
<el-button
type="text"
@ -262,14 +264,16 @@
scope.row.auditStatus == 6
"
@click.native="deleteCompanyCert(scope.row)"
>删除</el-button
>删除
</el-button
>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus == 2"
@click.native="explainCompanyCert(scope.row)"
>说明</el-button
>说明
</el-button
>
</template>
</el-table-column>
@ -347,7 +351,7 @@ import {
getSubCompany,
} from "@/api/supplier/supCompany";
import store from "@/store/index";
import { regionDataPlus, CodeToText } from "element-china-area-data";
import {regionDataPlus, CodeToText} from "element-china-area-data";
import {
filterCompanyCert,
deleteCompanyCert,
@ -356,8 +360,8 @@ import {
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
import draggable from "vuedraggable";
import { getCompany } from "@/api/supplier/company";
import { previewImage } from "@/api/purchase/supCompany";
import {getCompany} from "@/api/supplier/company";
import {previewImage} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
@ -535,7 +539,8 @@ export default {
this.getCompanyCertList();
this.selectedOptions = this.inputQuery.areaCode.split(",");
})
.catch(() => {});
.catch(() => {
});
},
onModifySubmit(val) {
@ -565,7 +570,8 @@ export default {
}
});
})
.catch(() => {});
.catch(() => {
});
} else {
return false;
}
@ -578,7 +584,7 @@ export default {
var str = "是否确定提交审核?";
} else if (val == 2) {
var str = "企业信息已拒绝审核,是否确认重新提交审核?";
} else {
} else {
var str = "企业信息已通过审核,是否确认重新提交审核?";
}
this.$refs["inputQuery"].validate((valid) => {
@ -602,7 +608,8 @@ export default {
}
});
})
.catch(() => {});
.catch(() => {
});
} else {
return false;
}
@ -610,7 +617,8 @@ export default {
}
},
onAuditSubmit() {},
onAuditSubmit() {
},
disableCert(row, status) {
row.status = status;
@ -720,7 +728,8 @@ export default {
confirmButtonText: "确定",
type: "warning",
showCancelButton: false,
}).then(() => {});
}).then(() => {
});
},
deleteCompanyCert(row) {
this.$confirm("是否删除?", "提示", {
@ -751,7 +760,8 @@ export default {
this.certLoading = false;
});
})
.catch(() => {});
.catch(() => {
});
},
},
filters: {

Loading…
Cancel
Save