|
@@ -36,9 +36,28 @@
|
|
|
<span v-show="this.$route.query.warehouseType == 2">(临)</span>
|
|
|
</h2>
|
|
|
<ws-info-table>
|
|
|
+ <!--合同编号-->
|
|
|
+ <ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ :filter-method="dataFilter1"
|
|
|
+ v-model="deptBudgetList.contractNo"
|
|
|
+ placeholder="请选择合同编号或移库任务编号"
|
|
|
+ class="typeselect"
|
|
|
+ @change='contractNoChange'
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options1"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.contractNo"
|
|
|
+ :value="item.contractNo"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
<!-- 货名 -->
|
|
|
<ws-form-item label="货名" span="1">
|
|
|
<ws-select
|
|
|
+ disabled
|
|
|
v-model="deptBudgetList.goodsName"
|
|
|
placeholder
|
|
|
class="typeselect"
|
|
@@ -52,6 +71,11 @@
|
|
|
/>
|
|
|
</ws-select>
|
|
|
</ws-form-item>
|
|
|
+ <ws-form-item label="类型" span="1" prop="type">
|
|
|
+ <ws-select v-model="deptBudgetList.type" @change="typeChange">
|
|
|
+ <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
<!--毛重(吨)-->
|
|
|
<ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
|
|
|
<ws-input
|
|
@@ -73,7 +97,15 @@
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
-
|
|
|
+ <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
|
|
|
+ <ws-input
|
|
|
+ @input="tarechange"
|
|
|
+ v-model="deptBudgetList.deductionWeight"
|
|
|
+ placeholder="请输入扣重"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
<!--净重(吨)-->
|
|
|
<ws-form-item label="净重(吨)" span="1" prop="netWeight">
|
|
|
<ws-input
|
|
@@ -84,6 +116,51 @@
|
|
|
size="small"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
|
|
|
+ <ws-input
|
|
|
+ @input='pureweight'
|
|
|
+ v-model="deptBudgetList.buckleWeightRatio"
|
|
|
+ placeholder="请输入扣重比"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
|
|
|
+ <ws-input
|
|
|
+ @input='pureweight'
|
|
|
+ v-model="deptBudgetList.solidGrainWater"
|
|
|
+ placeholder="请输入干粮水分占比"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
|
|
|
+ <ws-input
|
|
|
+ @input='pureweight(1)'
|
|
|
+ v-model="deptBudgetList.tidalGrainWater"
|
|
|
+ placeholder="请输入潮粮水分占比"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
|
|
|
+ <ws-input
|
|
|
+ disabled
|
|
|
+ v-model="deptBudgetList.pureWeight"
|
|
|
+ placeholder="不可编辑,自动计算"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--净重(吨)-->
|
|
|
+ <ws-form-item label="扣款" span="1" prop="deductionAmount">
|
|
|
+ <ws-input
|
|
|
+ v-model="deptBudgetList.deductionAmount"
|
|
|
+ placeholder="请输入扣款金额"
|
|
|
+ maxlength="120"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
<!-- 品级 -->
|
|
|
<ws-form-item label="品级" span="1" class="readonly">
|
|
|
<ws-select
|
|
@@ -120,12 +197,12 @@
|
|
|
</ws-form-item>
|
|
|
<!--出库日期-->
|
|
|
<ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
|
|
|
- <ws-date-picker
|
|
|
+ <el-date-picker
|
|
|
v-model="deptBudgetList.inOutDate"
|
|
|
- type="date"
|
|
|
placeholder="请选择入库日期"
|
|
|
+ type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- />
|
|
|
+ ></el-date-picker>
|
|
|
</ws-form-item>
|
|
|
<!-- 入库类型 -->
|
|
|
<ws-form-item label="入库类型" span="1">
|
|
@@ -147,28 +224,62 @@
|
|
|
<!--车牌号 -->
|
|
|
<ws-form-item label="车牌号" span="1" prop="carNo">
|
|
|
<ws-input
|
|
|
+ v-if='!carstatus'
|
|
|
v-model="deptBudgetList.carNo"
|
|
|
placeholder="请输入车牌号"
|
|
|
maxlength="7"
|
|
|
size="small"
|
|
|
/>
|
|
|
- </ws-form-item>
|
|
|
- <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
|
|
|
- <!--合同编号-->
|
|
|
- <ws-form-item label="合同编号" span="1" prop="contractNo">
|
|
|
- <ws-select
|
|
|
- v-model="deptBudgetList.contractNo"
|
|
|
- placeholder="请选择合同编号或移库任务编号"
|
|
|
+ <el-select
|
|
|
+ v-if='carstatus'
|
|
|
+ filterable
|
|
|
+ :filter-method="dataFilter2"
|
|
|
+ v-model="deptBudgetList.carNo"
|
|
|
+ placeholder="请选择车牌号"
|
|
|
class="typeselect"
|
|
|
+ @change='carChange'
|
|
|
>
|
|
|
- <ws-option
|
|
|
- v-for="item in outContractNo"
|
|
|
+ <el-option
|
|
|
+ v-for="item in options2"
|
|
|
:key="item.constKey"
|
|
|
- :label="item.contractNo"
|
|
|
- :value="item.contractNo"
|
|
|
+ :label="item.carNo+'('+item.tranCarNo+')'"
|
|
|
+ :value="item.carNo"
|
|
|
/>
|
|
|
- </ws-select>
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="成本" span="1" prop="cost">
|
|
|
+ <ws-input
|
|
|
+ :disabled='disabled1'
|
|
|
+ v-model="deptBudgetList.cost"
|
|
|
+ placeholder="请输入成本"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ width="17"
|
|
|
+ height="18"
|
|
|
+ style="vertical-align: text-top; position: relative; top: -1px"
|
|
|
+ src="../../../public/img/edit.png"
|
|
|
+ @click="editClick(1)"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</ws-form-item>
|
|
|
+ <ws-form-item label="运费" span="1" prop="freight">
|
|
|
+ <ws-input
|
|
|
+ :disabled='disabled2'
|
|
|
+ v-model="deptBudgetList.freight"
|
|
|
+ placeholder="请输入运费"
|
|
|
+ size="small"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ width="17"
|
|
|
+ height="18"
|
|
|
+ style="vertical-align: text-top; position: relative; top: -1px"
|
|
|
+ src="../../../public/img/edit.png"
|
|
|
+ @click="editClick(2)"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
|
|
|
</ws-info-table>
|
|
|
<div v-show="this.$route.query.warehouseType == 2 && this.deptBudgetList.createType == 2">
|
|
|
<el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
|
|
@@ -329,8 +440,10 @@ export default {
|
|
|
tableDate: [],
|
|
|
// 是否显示
|
|
|
showType: true,
|
|
|
+ typeList:['干粮','潮粮'],
|
|
|
// 年
|
|
|
year: '',
|
|
|
+ carstatus:false,
|
|
|
deptBudgetTotal: 0,
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
@@ -344,7 +457,9 @@ export default {
|
|
|
agent: [],
|
|
|
staffList: [],
|
|
|
options: [],
|
|
|
-
|
|
|
+ options1:[],
|
|
|
+ options2:[],
|
|
|
+ outContractNo1:[],
|
|
|
outContractNo: [],
|
|
|
|
|
|
// 提交类型
|
|
@@ -367,6 +482,9 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
size: 10,
|
|
|
+ disabled1:true,
|
|
|
+ disabled2:true,
|
|
|
+ tranCarInfoList:[],
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
deptCircularPage: {},
|
|
|
packtypeList: {},
|
|
@@ -376,6 +494,8 @@ export default {
|
|
|
},
|
|
|
contractList: [],
|
|
|
deptBudgetList: {
|
|
|
+ type:'干粮',
|
|
|
+ freight:0,
|
|
|
warehouseInOutDetail: {}
|
|
|
},
|
|
|
historyList: [],
|
|
@@ -395,10 +515,7 @@ export default {
|
|
|
this.deptBudgetList.binNumber = this.$route.query.binNumber
|
|
|
this.deptBudgetList.warehouseType = this.$route.query.warehouseType
|
|
|
this.deptBudgetList.createType = this.$route.query.createType
|
|
|
-
|
|
|
this.getList()
|
|
|
- this.deptBudgetList.goodsName = '玉米'
|
|
|
- this.deptBudgetList.goodsNameKey = '1'
|
|
|
this.deptBudgetList.grade = '一等品'
|
|
|
this.deptBudgetList.gradeKey = '1'
|
|
|
if (this.deptBudgetList.warehouseType == 1) {
|
|
@@ -410,10 +527,50 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ dataFilter1(val) {
|
|
|
+ console.log(val)
|
|
|
+ this.deptBudgetList.contractNo = val;
|
|
|
+ if (val) { //val存在
|
|
|
+ this.options1 = this.outContractNo1.filter((item) => {
|
|
|
+ if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else { //val为空时,还原数组
|
|
|
+ this.options1 = this.outContractNo;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dataFilter2(val) {
|
|
|
+ this.deptBudgetList.carNo = val;
|
|
|
+ if (val) { //val存在
|
|
|
+ this.options1 = this.outContractNo1.filter((item) => {
|
|
|
+ if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else { //val为空时,还原数组
|
|
|
+ this.options2 = this.tranCarInfoList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editClick(status){
|
|
|
+ if(status==1){
|
|
|
+ this.disabled1=!this.disabled1
|
|
|
+ }else{
|
|
|
+ this.disabled2=!this.disabled2
|
|
|
+ }
|
|
|
+ },
|
|
|
//返回按钮
|
|
|
revert() {
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
},
|
|
|
+ carChange(e){
|
|
|
+ for (let i = 0; i < this.tranCarInfoList.length; i++) {
|
|
|
+ if(this.tranCarInfoList[i].carNo==this.deptBudgetList.carNo){
|
|
|
+ this.deptBudgetList.freight=this.tranCarInfoList[i].tranPrice
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
dataFilter(val) {
|
|
|
// console.log(val,"名")
|
|
|
this.deptBudgetList.staffList = val
|
|
@@ -490,6 +647,153 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.deductionWeight) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.deductionWeight < 0 ||
|
|
|
+ this.deptBudgetList.deductionWeight > 10 ||
|
|
|
+ (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.deductionWeight).length -
|
|
|
+ (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
|
|
|
+ 3)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.buckleWeightRatio) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio < 0 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio > 3 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.buckleWeightRatio).length -
|
|
|
+ (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.tidalGrainWater) {
|
|
|
+ this.$message({
|
|
|
+ message: '潮粮水分不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater < 1 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater > 40 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.tidalGrainWater).length -
|
|
|
+ (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '潮粮水分输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.solidGrainWater) {
|
|
|
+ this.$message({
|
|
|
+ message: '干粮水分不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater < 1 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater > 40 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.solidGrainWater).length -
|
|
|
+ (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
|
|
|
+ 1)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '干粮水分输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.deductionAmount) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣款不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.deductionAmount < 0 ||
|
|
|
+ this.deptBudgetList.deductionAmount > 10000 ||
|
|
|
+ (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.deductionAmount).length -
|
|
|
+ (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣款输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
+ this.$message({
|
|
|
+ message: '未获取到成本,请编辑后提交',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
+ this.deptBudgetList.cost > 20000 ||
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '成本输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
+ this.deptBudgetList.cost > 100000 ||
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.agent) {
|
|
|
this.$message({
|
|
|
message: '经办人不能为空',
|
|
@@ -766,6 +1070,7 @@ export default {
|
|
|
'ws-pf_compId'
|
|
|
)
|
|
|
this.deptBudgetList.inOutFlag = 2
|
|
|
+ this.deptBudgetList.pcFlag = 1
|
|
|
this.deptBudgetList.statusFlag = 3
|
|
|
addstorageputList(this.deptBudgetList)
|
|
|
.toPromise()
|
|
@@ -833,6 +1138,153 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.deptBudgetList.deductionWeight) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.deductionWeight < 0 ||
|
|
|
+ this.deptBudgetList.deductionWeight > 10 ||
|
|
|
+ (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.deductionWeight).length -
|
|
|
+ (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
|
|
|
+ 3)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.buckleWeightRatio) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio < 0 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio > 3 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.buckleWeightRatio).length -
|
|
|
+ (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣重比输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.tidalGrainWater) {
|
|
|
+ this.$message({
|
|
|
+ message: '潮粮水分不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater < 1 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater > 40 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.tidalGrainWater).length -
|
|
|
+ (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '潮粮水分输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.solidGrainWater) {
|
|
|
+ this.$message({
|
|
|
+ message: '干粮水分不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater < 1 ||
|
|
|
+ this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater > 40 ||
|
|
|
+ (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.solidGrainWater).length -
|
|
|
+ (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
|
|
|
+ 1)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '干粮水分输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.deductionAmount) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣款不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.deductionAmount < 0 ||
|
|
|
+ this.deptBudgetList.deductionAmount > 10000 ||
|
|
|
+ (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.deductionAmount).length -
|
|
|
+ (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '扣款输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
+ this.$message({
|
|
|
+ message: '未获取到成本,请编辑后提交',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
+ this.deptBudgetList.cost > 20000 ||
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '成本输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费不能为空',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
+ this.deptBudgetList.cost > 100000 ||
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费输入错误',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.agent) {
|
|
|
this.$message({
|
|
|
message: '经办人不能为空',
|
|
@@ -1112,19 +1564,42 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
tarechange(e) {
|
|
|
- if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
|
+ if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare&&this.deptBudgetList.deductionWeight) {
|
|
|
this.deptBudgetList.netWeight = Number(
|
|
|
- this.deptBudgetList.grossWeight - this.deptBudgetList.tare
|
|
|
+ this.deptBudgetList.grossWeight - this.deptBudgetList.tare-this.deptBudgetList.deductionWeight
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
grossWeightchange(e) {
|
|
|
- if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
|
|
|
+ if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare&&this.deptBudgetList.deductionWeight) {
|
|
|
this.deptBudgetList.netWeight = Number(
|
|
|
- this.deptBudgetList.grossWeight - this.deptBudgetList.tare
|
|
|
+ this.deptBudgetList.grossWeight - this.deptBudgetList.tare-this.deptBudgetList.deductionWeight
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
+ contractNoChange(e){
|
|
|
+ for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
+ if (this.outContractNo[i].contractNo == e) {
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
+ this.deptBudgetList.cost= this.outContractNo[i].contractPrice
|
|
|
+ if(this.outContractNo[i].tranCarInfoList){
|
|
|
+ this.options2=this.outContractNo[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
|
|
|
+ this.carstatus=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ typeChange(e){
|
|
|
+
|
|
|
+ },
|
|
|
+ pureweight(status){
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
+ if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
|
|
|
+ this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
|
|
|
+ }
|
|
|
+ },
|
|
|
selectgoodsName(e) {
|
|
|
for (var i = 0; i < this.goodnameList.length; i++) {
|
|
|
if (this.goodnameList[i].constValue == e) {
|
|
@@ -1193,11 +1668,18 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
//合同编号
|
|
|
- xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
|
|
|
+ xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'),flag:6 })
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
|
+ this.options1=response
|
|
|
this.outContractNo = response
|
|
|
})
|
|
|
+ //合同编号2
|
|
|
+ xialaNo({ compId: sessionStorage.getItem('ws-pf_compId'),flag:7 })
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.outContractNo1 = response
|
|
|
+ })
|
|
|
//经办人
|
|
|
getstaff({ compId: sessionStorage.getItem('ws-pf_compId') ,warehouseId:this.deptBudgetList.baseId })
|
|
|
.toPromise()
|