This commit is contained in:
DESKTOP-369JRHT\12997 2023-10-25 09:25:42 +08:00
parent 51df6fc295
commit 090f3842fe
3 changed files with 28 additions and 9 deletions

View File

@ -192,6 +192,7 @@ export default {
query: {
purchaseId: data.id,
purchaseNo: data.purchaseNo,
// purchaseDate: data.purchaseDate,
state: data.status
}
});

View File

@ -46,9 +46,9 @@
<el-button type="primary" v-if="state=='await'" :disabled="saveFlag" @click="savePurchase()">保存</el-button>
<el-button type="success" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</el-button>
<el-button type="success" v-if="state=='ysh'" :disabled="storageFlag" @click="storage">收货并入库</el-button>
<el-button type="warning" v-if="state!='yzf' || state!='qrts'" :disabled="voidFlag" @click="abolition()">作废</el-button>
<el-button type="warning" v-if="state=='qrts'" :disabled="voidFlag" @click="abolition()">作废</el-button>
<!-- state=='yzf'-->
</div>
</div>
@ -294,22 +294,26 @@ export default {
//
rules: {
productDensity: [
{required: true, message: "不能为空", trigger: "blur"},
{required: true, message: "密度不能为空", trigger: "blur"},
{ type: 'number', message: '价格必须为数字值'}
],
purchaseWeight: [
{required: true, message: "不能为空", trigger: "blur"},
{required: true, message: "重量不能为空", trigger: "blur"},
{ type: 'number', message: '价格必须为数字值'}
],
purchasePrice: [
{required: true, message: "不能为空", trigger: "blur"},
{required: true, message: "价格不能为空", trigger: "blur"},
{ type: 'number', message: '价格必须为数字值'}
],
numberId: [
{required: true, message: "请选择", trigger: "blur"}
{required: true, message: "请选择采购油品", trigger: "blur"}
],
tankId: [
{required: true, message: "请选择", trigger: "blur"}
{required: true, message: "请选择油罐", trigger: "blur"}
] ,
supplierId: [
{required: true, message: "请选择", trigger: "blur"}
{required: true, message: "请选择供应商", trigger: "blur"}
]
},
@ -338,13 +342,15 @@ export default {
if (this.$route.query.purchaseId != null) {
this.queryParams.purchaseId = this.$route.query.purchaseId;
this.purchaseId = this.$route.query.purchaseId;
this.state = this.$route.query.state;
}else if (this.$route.query.purchaseId == null && this.purchaseId>0) {
}else {
this.queryParams.purchaseId = -parseInt(new Date().getTime())% 100000000;
this.purchaseId = -parseInt(new Date().getTime()) % 100000000;
}
this.state = this.$route.query.state;
if ( this.state == null) {
this.state = 'await'
}

View File

@ -267,21 +267,33 @@ export default {
],
tankVolume: [
{ required: true, message: "油罐体积不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
lowerWarning: [
{ required: true, message: "下线预警不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
oilDensity: [
{ required: true, message: "油品密度不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
storedQuantity: [
{ required: true, message: "存油数量不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
totalPrice: [
{ required: true, message: "存油总价不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
discountedPrice: [
{ required: true, message: "折合单价不能为空", trigger: "blur" },
{ type: 'number', message: '价格必须为数字值'}
],
status: [
{ required: true, message: "请选择", trigger: "blur" }