|
@@ -23,67 +23,72 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="center">
|
|
|
- <ws-form
|
|
|
- ref="deptBudgetList"
|
|
|
- :rules="ruleDeptBudget"
|
|
|
- :model="deptBudgetList"
|
|
|
- >
|
|
|
+ <ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
|
<!--基本信息-->
|
|
|
|
|
|
<ws-info-table>
|
|
|
<!--合同编号-->
|
|
|
- <ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
+ <ws-form-item
|
|
|
+ label="合同编号"
|
|
|
+ span="1"
|
|
|
+ prop="contractNo"
|
|
|
+ class="readonly"
|
|
|
+ >
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractNo"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入合同编号"
|
|
|
+ maxlength="20"
|
|
|
size="small"
|
|
|
+ :rules="ruleDeptBudget"
|
|
|
/>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--运输方式-->
|
|
|
- <ws-form-item label="运输方式" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="运输方式" span="1" prop="shippingType">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.shippingType"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入运输方式"
|
|
|
+ maxlength="20"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--买方-->
|
|
|
- <ws-form-item label="买方" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.buyer"
|
|
|
+ placeholder="请输入买方名称"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--结算方式-->
|
|
|
- <ws-form-item label="结算方式" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="结算方式" span="1" prop="settlementMethod">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.settlementMethod"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入结算方式"
|
|
|
+ maxlength="120"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--卖方-->
|
|
|
- <ws-form-item label="卖方" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.seller"
|
|
|
+ placeholder="请输入卖方名称"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--货源地-->
|
|
|
- <ws-form-item label="货源地" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="货源地" span="1" prop="sourceGoods">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.sourceGoods"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入货源地"
|
|
|
+ maxlength="20"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
@@ -91,25 +96,27 @@
|
|
|
<!--买方电话-->
|
|
|
<ws-form-item label="买方电话" span="1" prop="contractNo">
|
|
|
<ws-input
|
|
|
- v-model="deptBudgetList.buyerPhone"
|
|
|
+ v-model.number="deptBudgetList.buyerPhone"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--交货地-->
|
|
|
- <ws-form-item label="交货地" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="交货地" span="1" prop="placeDelivery">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.placeDelivery"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入交货地"
|
|
|
+ maxlength="20"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--卖方电话-->
|
|
|
- <ws-form-item label="卖方电话" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.sellerPhone"
|
|
|
+ placeholder="请输入卖方电话"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
@@ -133,9 +140,10 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--重量(吨)-->
|
|
|
- <ws-form-item label="重量(吨)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="重量(吨)" span="1" prop="weight">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.weight"
|
|
|
+ placeholder="请输入重量(吨)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
@@ -209,9 +217,10 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--溢短装(%)-->
|
|
|
- <ws-form-item label="溢短装(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="溢短装(%)" span="1" prop="overShort">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.overShort"
|
|
|
+ placeholder="请输入溢短装比例(%)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
@@ -234,13 +243,18 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--合同单价(元/吨)-->
|
|
|
- <ws-form-item label="合同单价(元/吨)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item
|
|
|
+ class="readonly"
|
|
|
+ label="合同单价(元/吨)"
|
|
|
+ span="1"
|
|
|
+ prop="unitContractPrice"
|
|
|
+ >
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.unitContractPrice"
|
|
|
+ placeholder="请输入合同单价"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--交货日期(止)-->
|
|
@@ -257,9 +271,10 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--合同总价-->
|
|
|
- <ws-form-item label="合同总价" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.totalContractPrice"
|
|
|
+ placeholder="请输入合同总价"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
@@ -293,7 +308,7 @@
|
|
|
|
|
|
<ws-info-table>
|
|
|
<!--货名-->
|
|
|
- <ws-form-item label="货名" span="1" prop="goodsName">
|
|
|
+ <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
|
|
|
<ws-select
|
|
|
v-model="deptBudgetList.contractGoodsInfo.goodsName"
|
|
|
placeholder=""
|
|
@@ -307,20 +322,20 @@
|
|
|
:value="item.constValue"
|
|
|
/>
|
|
|
</ws-select>
|
|
|
- <span class="unchangeable">*</span>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--水分(%)<=-->
|
|
|
- <ws-form-item label="水分(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="水分(%)" span="1" prop="waterContent">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.waterContent"
|
|
|
+ placeholder="请输入水分占比"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--品级-->
|
|
|
- <ws-form-item label="品级" span="1" prop="grade">
|
|
|
+ <ws-form-item label="品级" span="1" prop="grade" class="readonly">
|
|
|
<ws-select
|
|
|
v-model="deptBudgetList.contractGoodsInfo.grade"
|
|
|
placeholder=""
|
|
@@ -337,45 +352,50 @@
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--杂质(%)<=-->
|
|
|
- <ws-form-item label="杂质(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="杂质(%)" span="1" prop="impurity">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.impurity"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入杂质占比(%)"
|
|
|
+ maxlength="40"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--容量(克/升)>=-->
|
|
|
- <ws-form-item label="容量(克/升)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入容重"
|
|
|
+ maxlength="40"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--霉变粒(%)<=-->
|
|
|
- <ws-form-item label="霉变粒(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入霉变粒占比(%)"
|
|
|
+ maxlength="40"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--热损伤(%)<=-->
|
|
|
- <ws-form-item label="热损伤(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入输入热损伤占比(%)"
|
|
|
+ maxlength="40"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<!--不完整粒(%)<=-->
|
|
|
- <ws-form-item label="不完整粒(%)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
|
|
|
- maxlength="100"
|
|
|
+ placeholder="请输入不完整粒占比(%)"
|
|
|
+ maxlength="40"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
@@ -396,54 +416,64 @@
|
|
|
|
|
|
<ws-info-table>
|
|
|
<!--合同收入(元)-->
|
|
|
- <ws-form-item label="合同收入(元)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
|
|
|
+ placeholder="请输入合同收入(元)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--已开发票(元)-->
|
|
|
- <ws-form-item label="已开发票(元)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.goodsName"
|
|
|
+ placeholder="请输入已开发票(元)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--费用支出(元)-->
|
|
|
- <ws-form-item label="费用支出(元)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.waterContent"
|
|
|
+ placeholder="请输入费用支出(元)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--未开发票(元)-->
|
|
|
- <ws-form-item label="未开发票(元)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="未开发票(元)" span="1" prop="impurity">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.impurity"
|
|
|
+ placeholder="请输入未开发票(元)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--未回款(元)-->
|
|
|
- <ws-form-item label="未回款(元)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.mildewGrain"
|
|
|
+ placeholder="请输入未回款(元)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
|
|
|
<!--已完成发货量(吨)-->
|
|
|
- <ws-form-item label="已完成发货量(吨)" span="1" prop="contractNo">
|
|
|
+ <ws-form-item
|
|
|
+ label="已完成发运量(吨)"
|
|
|
+ span="1"
|
|
|
+ prop="imperfectGrain"
|
|
|
+ >
|
|
|
<ws-input
|
|
|
v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
|
|
|
+ placeholder="请输入已完成发运量(吨)"
|
|
|
maxlength="100"
|
|
|
size="small"
|
|
|
/>
|
|
@@ -500,7 +530,11 @@
|
|
|
</ws-form>
|
|
|
</div>
|
|
|
<div style="text-align: right; padding: 10px" class="center">
|
|
|
- <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
|
|
|
+ <el-button
|
|
|
+ class="bg-bottom"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="submit(deptBudgetList)"
|
|
|
>提交</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -583,7 +617,17 @@ export default {
|
|
|
// selectCrtDuty: {},
|
|
|
// dutyList: {},
|
|
|
// sexList: {},
|
|
|
- ruleDeptBudget: {},
|
|
|
+ ruleDeptBudget: {
|
|
|
+ contractNo: [
|
|
|
+ { required: true, message: '请输入活动名称', trigger: 'blur' },
|
|
|
+ {
|
|
|
+ min: 6,
|
|
|
+ max: 20,
|
|
|
+ message: '长度在 6 到 20 个字符',
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
selectIntendedShip: {},
|
|
|
interviewTypeList: {},
|
|
|
}
|
|
@@ -592,6 +636,12 @@ export default {
|
|
|
//cg.viewBudget
|
|
|
//cg.viewSpareMoney
|
|
|
// this.getVesselData();
|
|
|
+ this.deptBudgetList.packingMethod = '袋装'
|
|
|
+ this.deptBudgetList.packingMethodKey = 2
|
|
|
+ this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
|
|
|
+ this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
|
|
|
+ this.deptBudgetList.contractProcessInfo.grade = '未回收'
|
|
|
+ this.deptBudgetList.contractProcessInfo.gradeKey = 1
|
|
|
this.loaddata()
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
@@ -669,7 +719,377 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
submit() {
|
|
|
+ console.log(
|
|
|
+ new Date(this.deptBudgetList.deliveryDateStart).getTime(),
|
|
|
+ new Date(this.deptBudgetList.deliveryDateEnd).getTime()
|
|
|
+ )
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入合同编号',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log(this.deptBudgetList.contractNo.length)
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.contractNo.length < 6 ||
|
|
|
+ this.deptBudgetList.contractNo.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同编号长度不符合要求,请输入6到20个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.shippingType) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入运输方式!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.shippingType.length < 1 ||
|
|
|
+ this.deptBudgetList.shippingType.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '运输方式长度不符合要求,请输入1到20个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.buyer) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入买方名称!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.buyer.length < 4 ||
|
|
|
+ this.deptBudgetList.buyer.length > 30
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '买方名称长度不符合要求,请输入4到30个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.seller) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入卖方名称!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.seller.length < 4 ||
|
|
|
+ this.deptBudgetList.seller.length > 30
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '卖方名称长度不符合要求,请输入4到30个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.buyerPhone) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入买方电话!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.deptBudgetList.buyerPhone)) {
|
|
|
+ this.$message({
|
|
|
+ message: '输入买方电话有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.buyerPhone.length < 7 ||
|
|
|
+ this.deptBudgetList.buyerPhone.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '买方电话长度不符合要求,请输入7到20个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.sellerPhone) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入卖方电话!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.deptBudgetList.sellerPhone)) {
|
|
|
+ this.$message({
|
|
|
+ message: '输入卖方电话有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.buyerPhone.length < 7 ||
|
|
|
+ this.deptBudgetList.buyerPhone.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.settlementMethod) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入结算方式!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.deptBudgetList.sourceGoods) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入货源地!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.placeDelivery) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入交货地!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.weight) {
|
|
|
+ this.$message({
|
|
|
+ message: '请输入重量!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ isNaN(this.deptBudgetList.weight) ||
|
|
|
+ /\.\d{3}$/.test(this.deptBudgetList.weight) == false ||
|
|
|
+ this.deptBudgetList.weight < 0 ||
|
|
|
+ this.deptBudgetList.weight > 200000
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '输入重量有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.overShort &&
|
|
|
+ isNaN(this.deptBudgetList.overShort)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '溢短装输入有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.unitContractPrice &&
|
|
|
+ isNaN(this.deptBudgetList.unitContractPrice)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同单价输入有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.totalContractPrice &&
|
|
|
+ isNaN(this.deptBudgetList.totalContractPrice)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同总价输入有误!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.deliveryDateStart) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择交货日期(起)',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.deliveryDateEnd) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择交货日期(止)',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //时间
|
|
|
+ if (
|
|
|
+ new Date(this.deptBudgetList.deliveryDateStart).getTime() >
|
|
|
+ new Date(this.deptBudgetList.deliveryDateEnd).getTime()
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '交货日期(止)选择错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.signingDate) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择签订日期',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择货名',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择水分',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.contractGoodsInfo.grade) {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择品级',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.contractGoodsInfo.impurity ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.impurity)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.bulkDensity)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.mildewGrain)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.jiaorenli)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractGoodsInfo.imperfectGrain)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完整粒输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsNameKey) ==
|
|
|
+ false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同收入金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.waterContent) ==
|
|
|
+ false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '费用金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.mildewGrain) ==
|
|
|
+ false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '未回款金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.goodsName) ==
|
|
|
+ false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '已开发票金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
|
|
|
+ /\.\d{2}$/.test(this.deptBudgetList.contractProcessInfo.impurity) ==
|
|
|
+ false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '未开发票金额输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (!this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
|
|
|
+ (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
|
|
|
+ /\.\d{3}$/.test(
|
|
|
+ this.deptBudgetList.contractProcessInfo.imperfectGrain
|
|
|
+ ) == false
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '已完成发运量输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.deptBudgetList.compId = this.compId
|
|
@@ -686,6 +1106,9 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ resetForm(deptBudgetList) {
|
|
|
+ this.$refs[deptBudgetList].resetFields()
|
|
|
+ },
|
|
|
saveClick(item, index) {
|
|
|
console.log(item)
|
|
|
|
|
@@ -808,6 +1231,21 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
|
+ padding: 0 25px;
|
|
|
+}
|
|
|
+.readonly {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.readonly:after {
|
|
|
+ content: '*';
|
|
|
+ color: #ff2727;
|
|
|
+ position: absolute;
|
|
|
+ right: 8px;
|
|
|
+ z-index: 10;
|
|
|
+ top: 21%;
|
|
|
+ font-size: 20px;
|
|
|
+}
|
|
|
/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
|
width: 140px;
|
|
|
text-align: center;
|
|
@@ -970,4 +1408,7 @@ export default {
|
|
|
overflow: scroll;
|
|
|
height: 93vh;
|
|
|
}
|
|
|
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
|
|
|
+ width: 130px;
|
|
|
+}
|
|
|
</style>
|