|
@@ -0,0 +1,2209 @@
|
|
|
+<!--质检管理-->
|
|
|
+<template>
|
|
|
+ <div style='overflow-y:scroll;'>
|
|
|
+ <BaseHeaderLayout :leftSpan="16">
|
|
|
+ <template slot="left">
|
|
|
+ <el-button @click='warehousetypechange(1)' :type="serviceManagementType==1?'primary':''">贸易入库</el-button>
|
|
|
+ <el-button @click='warehousetypechange(3)' :type="serviceManagementType==3?'primary':''">收购入库</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="right">
|
|
|
+ <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
|
|
|
+ style="margin: 0 10px">
|
|
|
+ <ws-option v-for="item in warehouseList" :key="'cangku'+item.value" :label="item.value" :value="item.value"
|
|
|
+ style="color: #8890b1" />
|
|
|
+ </ws-select>
|
|
|
+ <!-- <el-checkbox @change='checkchange' v-model="checked">默认</el-checkbox> -->
|
|
|
+ </template>
|
|
|
+ </BaseHeaderLayout>
|
|
|
+ <div style='margin:10px;'>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button @click='statustypechange("初检")' :type="statusTypetext=='初检'?'primary':''">初检</el-button>
|
|
|
+ <el-button @click='statustypechange("复检")' :type="statusTypetext=='复检'?'primary':''">复检</el-button>
|
|
|
+ <el-button @click='statustypechange("确认")' :type="statusTypetext=='确认'?'primary':''">确认</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style='text-align:center;'>
|
|
|
+ <el-button @click='add' type="primary">新增</el-button>
|
|
|
+ <el-button @click='deletelist' type="danger">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style='text-align:right;'>
|
|
|
+ <el-button @click='record' type="primary">记录</el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="18">
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
+ <ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
|
+ <div style="margin: 0 auto">
|
|
|
+ <div class="title">
|
|
|
+ 基本信息
|
|
|
+ <el-checkbox v-if="statusTypetext=='初检'" v-model="directselling">原箱直销
|
|
|
+ <el-tooltip class="item" effect="dark" content="集装箱入库不开箱直接销售" placement="top-start">
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-checkbox>
|
|
|
+ </div>
|
|
|
+ <ws-info-table>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="任务编号" span="1" prop="inOutTaskNo">
|
|
|
+ <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
|
|
|
+ <el-option v-for="item in taskNolist" :key="'renwu'+item.inOutTaskNo" :label="item.inOutTaskNo" :value="item.inOutTaskNo" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="业务编号" span="1" prop="qualityNo">
|
|
|
+ <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="仓位号" span="1" prop="inOutTaskNo">
|
|
|
+ <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.binNumber" placeholder="请选择仓位号" class="typeselect" @change="binNumberChange">
|
|
|
+ <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber" :value="item.binNumber" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="业务编号" span="1" prop="qualityNo">
|
|
|
+ <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="客户" span="1" prop="customerName">
|
|
|
+ <el-select v-model="deptBudgetList.customerName" clearable filterable placeholder="请选择" class="typeselect"
|
|
|
+ @change="customerChange" :disabled="disabled1">
|
|
|
+ <el-option v-for="item in customerList" :key="'kehu'+item.valueKey" :label="item.value" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="囤位号" span="1" prop="storageTagNo">
|
|
|
+ <ws-input :disabled='recheck' v-model="deptBudgetList.storageTagNo" placeholder="选填,1-10个字符" maxlength="10" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="购粮性质" span="1" prop="natureOfGrainPurchase">
|
|
|
+ <ws-input v-model="deptBudgetList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10" size="small"
|
|
|
+ :disabled="disabled" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.outType=="移库入库"&&serviceManagementType==1' label="移库编号" span="1" prop="contractNo">
|
|
|
+ <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='deptBudgetList.outType!="移库入库"&&serviceManagementType==1' label="合同编号" span="1" prop="contractNo">
|
|
|
+ <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="成本(元/吨)" span="1" prop="cost">
|
|
|
+ <ws-input v-model="deptBudgetList.cost" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="提示" span="1" prop="tips">
|
|
|
+ <ws-input v-model="deptBudgetList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='statusTypetext!="复检"&&serviceManagementType==1' label="扣款" span="1" prop="deductionAmount">
|
|
|
+ <ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount" placeholder="选填,1-10个字符" maxlength="10" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="货名" span="1" prop="inOutTaskNo">
|
|
|
+ <ws-input v-model="deptBudgetList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="货名" span="1" prop="inOutTaskNo">
|
|
|
+ <el-select v-model="deptBudgetList.goodsName" clearable filterable placeholder="请选择" class="typeselect"
|
|
|
+ @change="goodsNameChange" :disabled="goodsdisabled">
|
|
|
+ <el-option v-for="item in goodnameList" :key="'huoming'+item.valueKey" :label="item.goodsName" :value="item.goodsName" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='statusTypetext!="初检"&&serviceManagementType==1' label="经办人" span="1" prop="agent">
|
|
|
+ <ws-input v-model="deptBudgetList.agent" placeholder="自动获取,不可编辑" maxlength="100" disabled size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="净重单价(元/公斤)" span="1" prop="tidalGrainPrice" v-if="deptBudgetList.type == '潮粮' && serviceManagementType == 3">
|
|
|
+ <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.tidalGrainPrice" placeholder="请输入净重单价"
|
|
|
+ maxlength="10" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="干粮单价(元/公斤)" span="2" prop="dryGrainPrice" v-if="deptBudgetList.type == '干粮' && serviceManagementType == 3">
|
|
|
+ <ws-input type="number" @mousewheel.native.prevent v-model="deptBudgetList.dryGrainPrice" placeholder="请输入干粮单价"
|
|
|
+ maxlength="10" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==3' label="类型" span="1" prop="type">
|
|
|
+ <ws-select v-model="deptBudgetList.type" disabled>
|
|
|
+ <ws-option v-for="item in typeList" :key="'leixin'+item" :label="item" :value="item" />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='statusTypetext=="初检"&&serviceManagementType==1' label="运费(元/吨)" span="1" prop="freight">
|
|
|
+ <ws-input :disabled="disabledfright" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small" type="number" @mousewheel.native.prevent />
|
|
|
+ <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>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="入库类型" span="1">
|
|
|
+ <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType" :disabled="isSelectType">
|
|
|
+ <ws-option v-for="item in storageType" :key="'rklx'+item.constKey" :label="item.constValue" :value="item.constValue" />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1' label="入库日期" span="1" prop="inOutDate" class="deliverydate">
|
|
|
+ <el-date-picker :disabled='recheck' v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date" value-format="yyyy-MM-dd"></el-date-picker>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="运输方式" span="1" prop="outType">
|
|
|
+ <el-select v-if='serviceManagementType==1' :disabled='recheck' v-model="deptBudgetList.outType" placeholder="请选择运输方式">
|
|
|
+ <el-option v-for="item in multiSelector" :key="'ysfs'+item.value" :label="item.name" :value="item.name" />
|
|
|
+ </el-select>
|
|
|
+ <el-select v-if='serviceManagementType==3' @change='outTypechange' :disabled='recheck' v-model="outType" placeholder="请选择运输方式">
|
|
|
+ <el-option v-for="item in multiSelector1" :key="item.id" :label="item.type+'('+item.contractNo+' '+item.seller+')'" :value="item.id" />
|
|
|
+ <el-option key="tayun1" label="他运" value="他运" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item v-if='serviceManagementType==1||serviceManagementType==3&&deptBudgetList.outType=="自运"' label="车队" span="1" prop="fleetName">
|
|
|
+ <el-select :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
|
|
|
+ <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName" :value="item.fleetName" />
|
|
|
+ </el-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="车牌号" span="1" prop="carNo">
|
|
|
+ <ws-input :disabled="disabled2" v-if="options2.length == 0 || serviceManagementType==3" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
|
|
|
+ size="small" />
|
|
|
+ <el-select :disabled="disabled2" v-if="carstatus && options2.length > 0 && serviceManagementType!=3" filterable clearable v-model="deptBudgetList.carNoCopy" placeholder="请选择车牌号" class="typeselect" @change="carChange">
|
|
|
+ <el-option v-for="(item,index) in options2" :key="index"
|
|
|
+ :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
|
|
|
+ </el-select>
|
|
|
+ <el-select :disabled="disabled2" v-if="!carstatus && options2.length > 0" filterable clearable :filter-method="dataFilter2"
|
|
|
+ v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
|
|
|
+ <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-select @change='carchange' v-if="statusTypetext=='初检'&&editcar==false&&carstatus||statusTypetext=='确认'&&editcar==false&&carstatus" v-model="deptBudgetList.carNo" placeholder="请选择车牌号">
|
|
|
+ <el-option v-for="(item,index) in options2" :key="item.value" :label="item.carNo + '(' + item.tranCarNo + ')'" :value="index" />
|
|
|
+ </el-select>
|
|
|
+ <el-select @change='carchange' v-if="statusTypetext=='初检'&&editcar==false&&!carstatus||statusTypetext=='确认'&&editcar==false&&!carstatus" v-model="deptBudgetList.carNo" placeholder="请选择车牌号">
|
|
|
+ <el-option v-for="(item,index) in options2" :key="item.value" :label="item.carNo" :value="index" />
|
|
|
+ </el-select>
|
|
|
+ <ws-input v-if="statusTypetext=='复检'||editcar" :disabled="disabled2" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" size="small" type="number" @mousewheel.native.prevent />
|
|
|
+ <img v-if="statusTypetext=='初检'||statusTypetext=='确认'" width="17" height="18" style="
|
|
|
+ vertical-align: text-top;
|
|
|
+ position: relative;
|
|
|
+ top: -1px;
|
|
|
+ " src="../../../public/img/edit.png" @click="editClick(3)" alt="" /> -->
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
|
|
|
+ <ws-input :disabled='recheck' v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
|
|
|
+ <ws-input :disabled='recheck' v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
|
|
|
+ <ws-input :disabled='recheck' v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="deptBudgetList.outType == '汽运' ||deptBudgetList.outType == '集装箱船'||serviceManagementType==3">
|
|
|
+ <ws-input :disabled='recheck' v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+
|
|
|
+ <div class="title">质检数据</div>
|
|
|
+ <ws-info-table>
|
|
|
+ <ws-form-item label="等级" span="1" prop="outType">
|
|
|
+ <ws-select v-if='statusTypetext!="复检"' v-model="deptBudgetList.grade" placeholder class="typeselect" @change="selectpackingMethod">
|
|
|
+ <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
|
|
|
+ :value="item.constValue" />
|
|
|
+ </ws-select>
|
|
|
+ <ws-select v-if='statusTypetext!="初检"' v-model="deptBudgetList.reGrade" placeholder class="typeselect" @change="reselectpackingMethod">
|
|
|
+ <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
|
|
|
+ :value="item.constValue" />
|
|
|
+ </ws-select>
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="水分(%)" span="1" prop="waterContent">
|
|
|
+ <ws-input @change="waterContentChange('water')" v-if='statusTypetext!="复检"' v-model="deptBudgetList.waterContent" type="number"
|
|
|
+ @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reWaterContent" type="number"
|
|
|
+ @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--杂质(%)<=-->
|
|
|
+ <ws-form-item label="杂质(%)" span="1" prop="impurity">
|
|
|
+ <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.impurity" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入杂质占比" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reImpurity" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入杂质占比" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--容重(克/升)-->
|
|
|
+ <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
|
|
|
+ <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.bulkDensity" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入容重" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reBulkDensity" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入容重" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--霉变粒(%)<=-->
|
|
|
+ <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
|
|
|
+ <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.mildewGrain" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入霉变粒占比" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reMildewGrain" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入霉变粒占比" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--热损伤(%)<=-->
|
|
|
+ <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
|
|
|
+ <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.jiaorenli" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入热损伤占比" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reJiaorenli" type="number" @mousewheel.native.prevent
|
|
|
+ placeholder="请输入热损伤占比" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ <!--不完善粒(%)<=-->
|
|
|
+ <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
|
|
|
+ <ws-input v-if='statusTypetext!="复检"' v-model="deptBudgetList.imperfectGrain" type="number"
|
|
|
+ @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
|
|
|
+ <ws-input :disabled='disablednotarize' v-if='statusTypetext!="初检"' v-model="deptBudgetList.reImperfectGrain" type="number"
|
|
|
+ @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
|
|
|
+ </ws-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+ <ws-info-table>
|
|
|
+ <el-form-item class='rememo' v-if='statusTypetext!="初检"' label="复检" span="1" prop="imperfectGrain">
|
|
|
+ <ws-input
|
|
|
+ v-model="deptBudgetList.reMemo"
|
|
|
+ type="textarea"
|
|
|
+ row="3"
|
|
|
+ placeholder="请输入备注信息,不超过200字"
|
|
|
+ maxlength="200"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </ws-form>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
+ <el-button v-if='statusTypetext=="复检"' @click='statustypechangelist(1)' :type="statusType==1?'primary':''">未复检</el-button>
|
|
|
+ <el-button v-if='statusTypetext=="复检"' @click='statustypechangelist(2)' :type="statusType==2?'primary':''">已复检</el-button>
|
|
|
+ <el-table @cell-click='listclick' :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border>
|
|
|
+ <el-table-column prop="qualityNo" width="100" label="业务编号"></el-table-column>
|
|
|
+ <el-table-column prop="carNumber" label="车牌号"></el-table-column>
|
|
|
+ <el-table-column prop="status" label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if='scope.row.confirm=="1"'>
|
|
|
+ 已确认
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ {{scope.row.status}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="but">
|
|
|
+ <div style='text-align:right;'>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="deptBudgetTotal">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-button @click="submit" type="primary">提交</el-button>
|
|
|
+ </div>
|
|
|
+ <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @opened='opendBtn' @close="closeDialog"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <inspectInfoPrint :printData="deptBudgetList" ref="saveImg"></inspectInfoPrint>
|
|
|
+ <div style="text-align:center">
|
|
|
+ <el-button type="primary" @click="closePrint">关闭</el-button>
|
|
|
+ <el-button type="primary" @click="printSmall">打印小票</el-button>
|
|
|
+ <el-button type="primary" @click="printBig">打印单据</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ selectWarehouseSelf,
|
|
|
+ getinspectList,
|
|
|
+ getinspectDelete,
|
|
|
+ getinspectLook,
|
|
|
+ getQRcode,
|
|
|
+ inspectAdd,
|
|
|
+ getinspectEdit,
|
|
|
+ getinspectcontractno,
|
|
|
+ getinspectLookUnitPrice,
|
|
|
+ getcustomer,
|
|
|
+ getDryGrainPrice,
|
|
|
+ getinspectLookGoods,
|
|
|
+ } from '@/model/houseSelfCollect/index'
|
|
|
+ import {
|
|
|
+ pullDown,
|
|
|
+ addstorageputList,
|
|
|
+ xialaNo,
|
|
|
+ getstaff,
|
|
|
+ getReceiptTaskNo,
|
|
|
+ } from '@/model/warehouse/index'
|
|
|
+ import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
|
+ import html2canvas from 'html2canvas'
|
|
|
+ import axios from 'axios'
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ inspectInfoPrint
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ //分页
|
|
|
+ currentPage: 1,
|
|
|
+ cost:'',
|
|
|
+ pageSize: 10,
|
|
|
+ isShowPrint:false,
|
|
|
+ typeList: ['干粮', '潮粮'],
|
|
|
+ disablednotarize:false,
|
|
|
+ goodsdisabled:false,
|
|
|
+ deptBudgetList:{
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ },
|
|
|
+ taskNolist:[],
|
|
|
+ outType:'',
|
|
|
+ purchasePriceList:[],
|
|
|
+ disabled:false,
|
|
|
+ goodnameList:[],
|
|
|
+ disabled2:false,
|
|
|
+ disabled1:false,
|
|
|
+ disabledfright:true,
|
|
|
+ recheck:false,
|
|
|
+ storageType:[],
|
|
|
+ multiSelector1:[],
|
|
|
+ isSelectType:false,
|
|
|
+ warehouseName:'',
|
|
|
+ warehouseCount:'',
|
|
|
+ warehouseNo: '',
|
|
|
+ cangid:'',
|
|
|
+ allowEdit:'0',
|
|
|
+ inspect:[],
|
|
|
+ // checked:false,
|
|
|
+ searchType: 0,
|
|
|
+ id:'',
|
|
|
+ warehouseList:[],
|
|
|
+ warehouseList1:[],
|
|
|
+ serviceManagementType:1,
|
|
|
+ statusType:0,
|
|
|
+ positionInfos:[],
|
|
|
+ statusTypetext:'初检',
|
|
|
+ directselling:false,
|
|
|
+ fleetNameList:[],
|
|
|
+ outContractNo:[],
|
|
|
+ options1:[],
|
|
|
+ editcar:false,
|
|
|
+ isGetCost:'',
|
|
|
+ disabled1:false,
|
|
|
+ carstatus:false,
|
|
|
+ options2:[],
|
|
|
+ tranCarInfoList:[],
|
|
|
+ gradeList:[],
|
|
|
+ deptBudgetTotal:0,
|
|
|
+ customerList:[],
|
|
|
+ customerList1:[],
|
|
|
+ multiSelector: [{
|
|
|
+ name: '汽运',
|
|
|
+ value: '0',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '火运',
|
|
|
+ value: '1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '集装箱船',
|
|
|
+ value: '2',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '散船',
|
|
|
+ value: '3',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ // searchKeyWord:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated(){
|
|
|
+ this.selectWarehouse()
|
|
|
+ var _saomaData = JSON.parse(localStorage.getItem("saoma_data"))
|
|
|
+ if(_saomaData){//缓存中有值,证明扫码进来的
|
|
|
+ this.warehouseName = _saomaData.warehouseName
|
|
|
+ this.warehouseNameChange(this.warehouseName)
|
|
|
+ let ids={}
|
|
|
+ ids.id = _saomaData.id
|
|
|
+ this.listclick(ids)
|
|
|
+ if(_saomaData.type == 1){
|
|
|
+ this.statusTypetext = "初检"
|
|
|
+ }else if(_saomaData.type == 2){
|
|
|
+ this.statusTypetext = "确认"
|
|
|
+ }else if(_saomaData.type == 3){
|
|
|
+ this.statusTypetext = "复检"
|
|
|
+ }
|
|
|
+ this.serviceManagementType = _saomaData.managementType
|
|
|
+ localStorage.removeItem("saoma_data");//第一次进来结束后清除缓存
|
|
|
+ }else{
|
|
|
+ let _WarehouseName = localStorage.getItem('houseSelfCollect_house1')
|
|
|
+ _WarehouseName = JSON.parse(_WarehouseName)
|
|
|
+ if (_WarehouseName) {
|
|
|
+ this.warehouseNameChange(_WarehouseName.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ binNumberChange(e){
|
|
|
+ for (let i = 0; i < this.positionInfos.length; i++) {
|
|
|
+ if(this.positionInfos[i].binNumber==e){
|
|
|
+ this.deptBudgetList.positionId=this.positionInfos[i].id
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goodsNameChange(e){
|
|
|
+ for (let q = 0; q < this.goodnameList.length; q++) {
|
|
|
+ if(this.goodnameList[q].contractNo=e){
|
|
|
+ this.deptBudgetList.goodsName=this.goodnameList[q].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey=this.goodnameList[q].goodsNameKey
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.waterContentChange()
|
|
|
+ },
|
|
|
+ outTypechange(e){
|
|
|
+ // console.log(e)
|
|
|
+ if(e!='他运'){
|
|
|
+ for (let i = 0; i < this.multiSelector1.length; i++) {
|
|
|
+ this.deptBudgetList.contractNo=this.multiSelector1[i].contractNo
|
|
|
+
|
|
|
+ }
|
|
|
+ for (let q = 0; q < this.outContractNo.length; q++) {
|
|
|
+ if(this.outContractNo[q].contractNo=this.deptBudgetList.contractNo){
|
|
|
+ this.deptBudgetList.goodsName=this.outContractNo[q].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey=this.outContractNo[q].goodsNameKey
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.outType='自运'
|
|
|
+ this.goodsdisabled=true
|
|
|
+ this.waterContentChange()
|
|
|
+ }else{
|
|
|
+ this.deptBudgetList.outType='他运'
|
|
|
+ this.goodsdisabled=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ printSmall() {
|
|
|
+ window.open('../../../static/inspectionnew.html?type=1&dataList=' + JSON.stringify(this.deptBudgetList))
|
|
|
+ },
|
|
|
+ printBig() {
|
|
|
+ window.open('../../../static/inspectionnew.html?type=2&dataList=' + JSON.stringify(this.deptBudgetList))
|
|
|
+ },
|
|
|
+ record(){
|
|
|
+ this.$router.push({path: 'inspectionManagementrecord' })
|
|
|
+ },
|
|
|
+ carChange(e) {
|
|
|
+ this.$set(this.deptBudgetList, 'customerName', this.carNumberList[e].shipperName)
|
|
|
+ this.$set(this.deptBudgetList, 'customerPhone', this.carNumberList[e].shipperPhone)
|
|
|
+ for (let i = 0; i < this.customerList1.length; i++) {
|
|
|
+ if (this.customerList1[i].customerName == this.deptBudgetList.customerName) {
|
|
|
+ this.deptBudgetList.customerNumberCard = this.customerList1[i].customerNumberCard
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.tranCarInfoList.length; i++) {
|
|
|
+ if (i==e) {
|
|
|
+ this.deptBudgetList.carNo = this.tranCarInfoList[i].carNo
|
|
|
+ this.deptBudgetList.carNoCopy = this.tranCarInfoList[i].carNo + '(' + this.tranCarInfoList[i].tranCarNo + ')'
|
|
|
+ this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
|
|
|
+ this.deptBudgetList.carId = this.tranCarInfoList[i].id
|
|
|
+ this.deptBudgetList.freight = Math.round(
|
|
|
+ this.tranCarInfoList[i].tranPrice
|
|
|
+ )
|
|
|
+ if (this.deptBudgetList.inOutType == '移库入库') {
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
+ this.deptBudgetList.cost = this.tranCarInfoList[i].cost
|
|
|
+ }
|
|
|
+ this.deptBudgetList.loadNetWeight =
|
|
|
+ this.tranCarInfoList[i].loadNetWeight
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ customerChange(e) {
|
|
|
+ let customers = e.split('(')
|
|
|
+ this.deptBudgetList.customerName = customers[0]
|
|
|
+ for (let i = 0; i < this.customerList1.length; i++) {
|
|
|
+ // console.log(this.customerList1[i].customerName, this.customerList1[i])
|
|
|
+ if (this.customerList1[i].customerName == this.deptBudgetList.customerName) {
|
|
|
+ // console.log(this.customerList1[i])
|
|
|
+ this.deptBudgetList.customerNumberCard = this.customerList1[i].customerNumberCard
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.customerPhone = customers[1].split(')')[0]
|
|
|
+ },
|
|
|
+ waterContentChange(type) {
|
|
|
+ if (this.deptBudgetList.goodsName && type != 'water') {
|
|
|
+ if (this.deptBudgetList.goodsName.indexOf('潮粮') != -1) {
|
|
|
+ this.deptBudgetList.type = '潮粮'
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.type = '干粮'
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.dryGrainPrice || this.deptBudgetList.dryGrainPrice == 0) {
|
|
|
+ getDryGrainPrice({
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName: this.deptBudgetList.goodsName
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$set(this.deptBudgetList, 'dryGrainPrice', response)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //客户
|
|
|
+ getcustomer({
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName:this.deptBudgetList.goodsName
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.customerList1 = response
|
|
|
+ this.customerList = []
|
|
|
+ let customer = response
|
|
|
+ for (let i = 0; i < response.length; i++) {
|
|
|
+ if (response[i].supplier) {
|
|
|
+ customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
|
|
|
+ .supplier
|
|
|
+ } else {
|
|
|
+ customer = response[i].customerName + '(' + response[i].customerPhone + ')'
|
|
|
+ }
|
|
|
+ this.customerList.push({
|
|
|
+ valueKey: i,
|
|
|
+ value: customer,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ for (var i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
+ if (this.purchasePriceList[i].goodsName == this.deptBudgetList.goodsName) {
|
|
|
+ this.$set(this.deptBudgetList, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)
|
|
|
+ this.$set(this.deptBudgetList, 'paramType', this.purchasePriceList[i].paramType)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //潮粮单价改变事件
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.goodsName &&
|
|
|
+ this.deptBudgetList.waterContent &&
|
|
|
+ this.deptBudgetList.grade
|
|
|
+ ) {
|
|
|
+ getinspectLookUnitPrice({
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName: this.deptBudgetList.goodsName,
|
|
|
+ waterContent: this.deptBudgetList.waterContent,
|
|
|
+ grade: this.deptBudgetList.grade,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if (this.deptBudgetList.paramType == '1') {
|
|
|
+ this.deptBudgetList.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.deptBudgetList
|
|
|
+ .buckleMiscellaneous) / 100 * parseFloat(this.deptBudgetList.dryGrainPrice?this.deptBudgetList.dryGrainPrice:0 )).toFixed(4)
|
|
|
+ } else {
|
|
|
+ if (this.inspect.type == '干粮') {
|
|
|
+ if (response == 0) {
|
|
|
+ getDryGrainPrice({
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName: this.deptBudgetList.goodsName
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$set(this.deptBudgetList, 'dryGrainPrice', response)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.dryGrainPrice = response
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tidalGrainPrice = response
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.goodsName && this.deptBudgetList.customerName) {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ opendBtn(){
|
|
|
+ html2canvas(this.$refs.saveImg.$el).then(canvas => {
|
|
|
+ let dataURL = canvas.toDataURL('image/png');
|
|
|
+ this.imgUrl = dataURL;
|
|
|
+ if (this.imgUrl !== '') {
|
|
|
+ let b = this.dataURLtoFile(this.imgUrl, 'printImg')
|
|
|
+ let formdata = new FormData();
|
|
|
+ formdata.append('file', b);
|
|
|
+ axios({
|
|
|
+ method: 'post',
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ data: formdata
|
|
|
+ }).then((response) => {
|
|
|
+ //编辑接口
|
|
|
+ this.deptBudgetList.pictureAddress = response.data.url
|
|
|
+ console.log(this.types)
|
|
|
+ if (this.types == 3) {
|
|
|
+ this.deptBudgetList.flag = 0
|
|
|
+ } else if (this.types == 4) {
|
|
|
+ this.deptBudgetList.flag = 1
|
|
|
+ }
|
|
|
+ getinspectEdit(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.types = ''
|
|
|
+ // this.inspect = []
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ closeDialog() {
|
|
|
+ html2canvas(this.$refs.saveImg.$el).then(canvas => {
|
|
|
+ let dataURL = canvas.toDataURL('image/png');
|
|
|
+ this.imgUrl = dataURL;
|
|
|
+ if (this.imgUrl !== '') {
|
|
|
+ let b = this.dataURLtoFile(this.imgUrl, 'printImg')
|
|
|
+ let formdata = new FormData();
|
|
|
+ formdata.append('file', b);
|
|
|
+ axios({
|
|
|
+ method: 'post',
|
|
|
+ url: 'https://www.zthymaoyi.com/upload/admin',
|
|
|
+ data: formdata
|
|
|
+ }).then((response) => {
|
|
|
+ //编辑接口
|
|
|
+ this.deptBudgetList.pictureAddress = response.data.url
|
|
|
+ console.log(this.types)
|
|
|
+ if (this.types == 3) {
|
|
|
+ this.deptBudgetList.flag = 0
|
|
|
+ } else if (this.types == 4) {
|
|
|
+ this.deptBudgetList.flag = 1
|
|
|
+ }
|
|
|
+ getinspectEdit(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.types = ''
|
|
|
+ // this.inspect = []
|
|
|
+ this.isShowPrint = false
|
|
|
+ this.deptBudgetList={
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+ disablednotarize:false,
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.dialogTableVisible = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ deletelist(){
|
|
|
+ if(this.id){
|
|
|
+ getinspectDelete({
|
|
|
+ id: this.id
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.deptBudgetList={
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+ disablednotarize:false,
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ listclick(row){
|
|
|
+ this.id=row.id
|
|
|
+ getinspectLook({
|
|
|
+ id: row.id
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ console.log(response)
|
|
|
+ this.deptBudgetList=response
|
|
|
+ this.deptBudgetList.warehouseInOutDetail={
|
|
|
+ grade:response.grade,
|
|
|
+ reGrade:response.reGrade,
|
|
|
+ imperfectGrain:response.imperfectGrain,
|
|
|
+ reImperfectGrain:response.reImperfectGrain,
|
|
|
+ impurity:response.impurity,
|
|
|
+ reImpurity:response.reImpurity,
|
|
|
+ jiaorenli:response.jiaorenli,
|
|
|
+ reJiaorenli:response.reJiaorenli,
|
|
|
+ bulkDensity:response.bulkDensity,
|
|
|
+ reBulkDensity:response.reBulkDensity,
|
|
|
+ mildewGrain:response.mildewGrain,
|
|
|
+ reMildewGrain:response.reMildewGrain,
|
|
|
+ }
|
|
|
+ this.deptBudgetList.carNo=response.carNumber
|
|
|
+ for (let i = 0; i < this.taskNolist.length; i++) {
|
|
|
+ if (this.taskNolist[i].inOutTaskNo == this.deptBudgetList.inOutTaskNo) {
|
|
|
+ console.log(this.taskNolist[i])
|
|
|
+ var data = this.taskNolist[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!data) return
|
|
|
+ for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
+ if (
|
|
|
+ this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
+ ) {
|
|
|
+ console.log(this.outContractNo[i])
|
|
|
+ if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
+ if (!this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips ='卖方' +this.outContractNo[i].seller +'( ' + this.outContractNo[i].unitContractPrice +'元/吨)'
|
|
|
+ }
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ if (this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips ='出货库' +data.sendWarehouse +' (' +this.outContractNo[i].unitContractPrice +'元/吨)'
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库出库') {
|
|
|
+
|
|
|
+ this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
|
+ }else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
+ if (this.outContractNo[i].contractNo) {
|
|
|
+ this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if (this.outContractNo[i].tranCarInfoList) {
|
|
|
+ this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
+ // this.carstatus = true
|
|
|
+ }
|
|
|
+ this.fleetNameList=this.outContractNo[i].tranCarInfoList1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+ })
|
|
|
+ // if(){
|
|
|
+
|
|
|
+ // }
|
|
|
+ // this.deptBudgetList=row
|
|
|
+ // console.log(row)
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ add(){
|
|
|
+ this.outType=''
|
|
|
+ this.deptBudgetList={
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+ disablednotarize:false,
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ }
|
|
|
+ },
|
|
|
+ statustypechangelist(status){
|
|
|
+ this.statusType=status
|
|
|
+ getinspectList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ statusType:this.statusType,
|
|
|
+ serviceManagementType:this.serviceManagementType
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.inspect = response.records
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
+ // this.$forceUpdate();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ statustypechange(status){
|
|
|
+ this.statusTypetext=status
|
|
|
+ if(status=='初检'){
|
|
|
+ this.disabled2=false
|
|
|
+ this.deptBudgetList.statusType=1
|
|
|
+ this.recheck=false
|
|
|
+ }else if(status=='复检'){
|
|
|
+ this.deptBudgetList.statusType=1
|
|
|
+ this.recheck=true
|
|
|
+ this.disabled2=true
|
|
|
+ this.isSelectType=true
|
|
|
+ }else if(status=='确认'){
|
|
|
+ this.deptBudgetList.statusType=3
|
|
|
+ this.recheck=false
|
|
|
+ this.disablednotarize=true
|
|
|
+ this.disabled2=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submit(){
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
+ this.$message({
|
|
|
+ message: '货名不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!String(this.deptBudgetList.deductionAmount)&&this.statusTypetext!='复检') {
|
|
|
+ this.$message({
|
|
|
+ message: '扣款不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!String(this.deptBudgetList.reDeductionAmount)&&this.statusTypetext=='复检') {
|
|
|
+ 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
|
|
|
+ // }
|
|
|
+ console.log(this.serviceManagementType)
|
|
|
+ if(this.serviceManagementType==1){
|
|
|
+ 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 (!String(this.deptBudgetList.freight)) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.freight < 0 ||
|
|
|
+ this.deptBudgetList.freight > 100000 ||
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.freight).length -
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '运费输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.inOutDate) {
|
|
|
+ this.$message({
|
|
|
+ message: '入库日期不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.inOutType) {
|
|
|
+ this.$message({
|
|
|
+ message: '入库类型不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.grade=this.deptBudgetList.grade
|
|
|
+ if (!this.deptBudgetList.grade) {
|
|
|
+ this.$message({
|
|
|
+ message: '等级不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reGrade=this.deptBudgetList.reGrade
|
|
|
+ if (!this.deptBudgetList.reGrade&&this.statusTypetext=='复检') {
|
|
|
+ this.$message({
|
|
|
+ message: '复检等级不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.carNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.carNo.length > 7) {
|
|
|
+ this.$message({
|
|
|
+ message: '车牌号输入错误,请输入7个字符之内',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.directselling){
|
|
|
+ if (!this.deptBudgetList.boxNo ) {
|
|
|
+ this.$message({
|
|
|
+ message: '箱号-1不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.titleNo ) {
|
|
|
+ this.$message({
|
|
|
+ message: '封号-1不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.deptBudgetList.boxNo&&!this.deptBudgetList.titleNo){
|
|
|
+ this.$message({
|
|
|
+ message: '封号-1不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.deptBudgetList.boxNoOther&&!this.deptBudgetList.titleNoOther){
|
|
|
+ this.$message({
|
|
|
+ message: '封号-2不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
|
|
|
+ this.$message({
|
|
|
+ message: '箱号-1输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.boxNoOther &&
|
|
|
+ this.deptBudgetList.boxNoOther.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '箱号-2输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.titleNo &&
|
|
|
+ this.deptBudgetList.titleNo.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '封号-1输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.titleNoOther &&
|
|
|
+ this.deptBudgetList.titleNoOther.length > 20
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '封号-2输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.serviceManagementType==1||this.serviceManagementType==3&&this.deptBudgetList.outType=='自运'){
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
+ this.$message({
|
|
|
+ message: '合同编号不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // if (
|
|
|
+ // this.deptBudgetList.contractNo.length < 6 ||
|
|
|
+ // this.deptBudgetList.contractNo.length > 20
|
|
|
+ // ) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '合同编号长度不符合要求,请输入6-20个字符之内',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if (!this.deptBudgetList.addressUrl) {
|
|
|
+ // this.$message({
|
|
|
+ // message: '附件不能为空',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //自检员
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.waterContent=this.deptBudgetList.waterContent
|
|
|
+ if (this.deptBudgetList.waterContent) {
|
|
|
+ if (isNaN(this.deptBudgetList.waterContent)) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.waterContent < 0 ||
|
|
|
+ this.deptBudgetList.waterContent > 40 ||
|
|
|
+ (String(this.deptBudgetList.waterContent
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.waterContent)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.waterContent
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reWaterContent=this.deptBudgetList.reWaterContent
|
|
|
+ if (this.deptBudgetList.reWaterContent) {
|
|
|
+ if (isNaN(this.deptBudgetList.reWaterContent)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检水分(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.reWaterContent < 0 ||
|
|
|
+ this.deptBudgetList.reWaterContent > 40 ||
|
|
|
+ (String(this.deptBudgetList.reWaterContent
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.reWaterContent)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reWaterContent
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //杂质
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.impurity=this.deptBudgetList.impurity
|
|
|
+ if (this.deptBudgetList.impurity) {
|
|
|
+ if (isNaN(this.deptBudgetList.impurity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.impurity < 0 ||
|
|
|
+ this.deptBudgetList.impurity > 40 ||
|
|
|
+ (String(this.deptBudgetList.impurity).indexOf( '.') != -1 &&
|
|
|
+ String(this.deptBudgetList.impurity).length -
|
|
|
+ (String(this.deptBudgetList.impurity).indexOf('.') +1) >2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reImpurity=this.deptBudgetList.reImpurity
|
|
|
+ if (this.deptBudgetList.reImpurity) {
|
|
|
+ if (isNaN(this.deptBudgetList.reImpurity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检杂质(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.reImpurity < 0 ||
|
|
|
+ this.deptBudgetList.reImpurity > 40 ||
|
|
|
+ (String(this.deptBudgetList.reImpurity).indexOf( '.') != -1 &&
|
|
|
+ String(this.deptBudgetList.reImpurity).length -
|
|
|
+ (String(this.deptBudgetList.reImpurity).indexOf('.') +1) >2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //霉变
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.mildewGrain=this.deptBudgetList.mildewGrain
|
|
|
+ if (this.deptBudgetList.mildewGrain) {
|
|
|
+ if (isNaN(this.deptBudgetList.mildewGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.mildewGrain < 0 ||
|
|
|
+ this.deptBudgetList.mildewGrain > 40 ||
|
|
|
+ (String(this.deptBudgetList.mildewGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.deptBudgetList.mildewGrain)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.mildewGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reMildewGrain=this.deptBudgetList.reMildewGrain
|
|
|
+ if (this.deptBudgetList.reMildewGrain) {
|
|
|
+ if (isNaN(this.deptBudgetList.reMildewGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检霉变粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.reMildewGrain < 0 ||
|
|
|
+ this.deptBudgetList.reMildewGrain > 40 ||
|
|
|
+ (String(this.deptBudgetList.reMildewGrain).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.deptBudgetList.reMildewGrain)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reMildewGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.jiaorenli=this.deptBudgetList.jiaorenli
|
|
|
+ //热损伤
|
|
|
+ if (this.deptBudgetList.jiaorenli) {
|
|
|
+ if (isNaN(this.deptBudgetList.jiaorenli)) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.jiaorenli < 0 ||
|
|
|
+ this.deptBudgetList.jiaorenli > 40 ||
|
|
|
+ (String(this.deptBudgetList.jiaorenli).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.deptBudgetList.jiaorenli).length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.jiaorenli
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reJiaorenli=this.deptBudgetList.reJiaorenli
|
|
|
+ if (this.deptBudgetList.reJiaorenli) {
|
|
|
+ if (isNaN(this.deptBudgetList.reJiaorenli)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检热损伤(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.reJiaorenli < 0 ||
|
|
|
+ this.deptBudgetList.reJiaorenli > 40 ||
|
|
|
+ (String(this.deptBudgetList.reJiaorenli).indexOf(
|
|
|
+ '.'
|
|
|
+ ) != -1 &&
|
|
|
+ String(this.deptBudgetList.reJiaorenli).length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reJiaorenli
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.imperfectGrain=this.deptBudgetList.imperfectGrain
|
|
|
+ //不完善粒(%)
|
|
|
+ if (this.deptBudgetList.imperfectGrain) {
|
|
|
+ if (isNaN(this.deptBudgetList.imperfectGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完善粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.imperfectGrain < 0 ||
|
|
|
+ this.deptBudgetList.imperfectGrain > 40 ||
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.imperfectGrain
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.imperfectGrain)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.imperfectGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reImperfectGrain=this.deptBudgetList.reImperfectGrain
|
|
|
+ if (this.deptBudgetList.reImperfectGrain) {
|
|
|
+ if (isNaN(this.deptBudgetList.reImperfectGrain)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检不完善粒(%)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.deptBudgetList.reImperfectGrain < 0 ||
|
|
|
+ this.deptBudgetList.reImperfectGrain > 40 ||
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reImperfectGrain
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.reImperfectGrain)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reImperfectGrain
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //容重
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.bulkDensity=this.deptBudgetList.bulkDensity
|
|
|
+ if (this.deptBudgetList.bulkDensity) {
|
|
|
+ if (isNaN(this.deptBudgetList.bulkDensity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重(克/升)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (this.deptBudgetList.bulkDensity &&
|
|
|
+ String(
|
|
|
+ this.deptBudgetList.bulkDensity
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.bulkDensity)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.bulkDensity
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2) ||
|
|
|
+ this.deptBudgetList.bulkDensity > 1000 ||
|
|
|
+ this.deptBudgetList.bulkDensity < 0
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '容重输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reBulkDensity=this.deptBudgetList.reBulkDensity
|
|
|
+ if (this.deptBudgetList.reBulkDensity) {
|
|
|
+ if (isNaN(this.deptBudgetList.reBulkDensity)) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检容重(克/升)非数字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ (this.deptBudgetList.reBulkDensity &&
|
|
|
+ String(
|
|
|
+ this.deptBudgetList.reBulkDensity
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
+ String(this.deptBudgetList.reBulkDensity)
|
|
|
+ .length -
|
|
|
+ (String(
|
|
|
+ this.deptBudgetList.reBulkDensity
|
|
|
+ ).indexOf('.') +
|
|
|
+ 1) >
|
|
|
+ 2) ||
|
|
|
+ this.deptBudgetList.reBulkDensity > 1000 ||
|
|
|
+ this.deptBudgetList.reBulkDensity < 0
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '复检容重输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.deptBudgetList, '入库对象')
|
|
|
+
|
|
|
+ this.$confirm(`确定提交入库信息`, {
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.deptBudgetList.baseId=this.cangid
|
|
|
+ this.deptBudgetList.carNumber=this.deptBudgetList.carNo
|
|
|
+ this.deptBudgetList.warehouseName=this.warehouseName
|
|
|
+ this.deptBudgetList.serviceManagementType=this.serviceManagementType
|
|
|
+ this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
|
|
|
+ this.deptBudgetList.secretaryWeigher =
|
|
|
+ localStorage.getItem('ws-pf_staffName')
|
|
|
+ this.deptBudgetList.inOutFlag = 2
|
|
|
+ this.deptBudgetList.pcFlag = 1
|
|
|
+ this.deptBudgetList.statusFlag = 1
|
|
|
+ if(this.statusTypetext=='初检'){
|
|
|
+ addstorageputList(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.deptBudgetList.warehouseInOutId=response
|
|
|
+ inspectAdd(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response1) => {
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.getList()
|
|
|
+ // this.$router.push({
|
|
|
+ // path: 'warehouseManagementList',
|
|
|
+ // })
|
|
|
+ getinspectLook({
|
|
|
+ id: response1
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response2) => {
|
|
|
+ // let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid
|
|
|
+ // getQRcode({printString}).toPromise()
|
|
|
+ // .then((res) => {
|
|
|
+ this.isShowPrint = true
|
|
|
+ this.printData = response2
|
|
|
+ // this.printData.qrCodeUrl = res
|
|
|
+ // })
|
|
|
+ this.deptBudgetList = response2
|
|
|
+ if (response.compName == '黑龙江秋收有限公司') {
|
|
|
+ this.deptBudgetList.compName = '黑龙江中天昊元贸易有限公司'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ })
|
|
|
+
|
|
|
+ // this.$message.success('保存成功')
|
|
|
+
|
|
|
+ //打印
|
|
|
+ // this.$router.go(-1)
|
|
|
+ })
|
|
|
+ }else if(this.statusTypetext=='复检'){
|
|
|
+ this.deptBudgetList.flag=1
|
|
|
+ getinspectEdit(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ addstorageputList(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.deptBudgetList={
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+ disablednotarize:false,
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else if(this.statusTypetext=='确认'){
|
|
|
+ this.deptBudgetList.flag=2
|
|
|
+ getinspectEdit(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ addstorageputList(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.deptBudgetList={
|
|
|
+ type: '潮粮',
|
|
|
+ freight: 0,
|
|
|
+ cost: '',
|
|
|
+ addressUrl: '',
|
|
|
+ tidalGrainPrice: 0,
|
|
|
+ buckleWeightRatio: 0,
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
+ buckleMiscellaneous: 0,
|
|
|
+ paramType: 1,
|
|
|
+ warehouseInOutDetail: {
|
|
|
+ grade:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ },
|
|
|
+ disablednotarize:false,
|
|
|
+ deductionAmount: 0,
|
|
|
+ deductionWeight: 0,
|
|
|
+ grossWeight: 0,
|
|
|
+ tare: 0,
|
|
|
+ grade:'',
|
|
|
+ inOutDate: '',
|
|
|
+ netWeight:0,
|
|
|
+ pureWeight:0,
|
|
|
+ deductionWeight:0,
|
|
|
+ waterContent:'',
|
|
|
+ reWaterContent:'',
|
|
|
+ reGrade:'',
|
|
|
+ imperfectGrain:'',
|
|
|
+ reImperfectGrain:'',
|
|
|
+ impurity:'',
|
|
|
+ reImpurity:'',
|
|
|
+ jiaorenli:'',
|
|
|
+ reJiaorenli:'',
|
|
|
+ bulkDensity:'',
|
|
|
+ reBulkDensity:'',
|
|
|
+ reMemo:'',
|
|
|
+ storageTagNo:'',
|
|
|
+ mildewGrain:'',
|
|
|
+ reMildewGrain:'',
|
|
|
+ boxNo:'',
|
|
|
+ boxNoOther:'',
|
|
|
+ titleNo:'',
|
|
|
+ titleNoOther:'',
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ kkInput(val) {
|
|
|
+ console.log(val)
|
|
|
+ if (this.isGetCost) {
|
|
|
+ if (this.deptBudgetList.cost > val) {
|
|
|
+ this.deptBudgetList.cost =
|
|
|
+ this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取当前年月日
|
|
|
+ getTime(){
|
|
|
+ var date= new Date()
|
|
|
+ var mouth=date.getMonth()+1
|
|
|
+ var day=date.getDate()
|
|
|
+ if(mouth<10){
|
|
|
+ mouth='0'+mouth
|
|
|
+ }
|
|
|
+ if(day<10){
|
|
|
+ day='0'+day
|
|
|
+ }
|
|
|
+ return date.getFullYear()+mouth+date.getDate()
|
|
|
+ },
|
|
|
+ editClick(status){
|
|
|
+ if(status==3){
|
|
|
+ this.editcar=!this.editcar
|
|
|
+ }else if(status==2){
|
|
|
+ this.disabledfright=!this.disabledfright
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectWarehouse() {
|
|
|
+ selectWarehouseSelf({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.warehouseList1 = response
|
|
|
+ this.warehouseList = []
|
|
|
+ let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
|
|
|
+ _wareHouse = JSON.parse(_wareHouse)
|
|
|
+ for (let i = 0; i < response.length; i++) {
|
|
|
+ if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
|
|
|
+ this.warehouseCount = response[i].count
|
|
|
+ this.allowEdit = response[i].allowEdit
|
|
|
+ this.cangid = _wareHouse.warehouseId
|
|
|
+ this.warehouseName = response[i].warehouseName
|
|
|
+ this.positionInfos=response[i].positionInfos
|
|
|
+ this.warehouseNo = response[i].commonWarehouseNo
|
|
|
+ }
|
|
|
+ this.warehouseList.push({
|
|
|
+ value: response[i].warehouseName,
|
|
|
+ warehouseId: response[i].id,
|
|
|
+ count: response[i].count,
|
|
|
+ No: response[i].commonWarehouseNo,
|
|
|
+ allowEdit: response[i].allowEdit,
|
|
|
+ compId: localStorage.getItem('ws-pf_compId')
|
|
|
+ })
|
|
|
+ if (!_wareHouse) {
|
|
|
+ if (this.cangid && this.cangid == response[i].id) {
|
|
|
+ this.warehouseName = response[i].warehouseName
|
|
|
+ this.warehouseCount = response[i].count
|
|
|
+ this.warehouseNo = response[i].commonWarehouseNo
|
|
|
+ this.allowEdit = response[i].allowEdit
|
|
|
+ }
|
|
|
+ if (this.warehouseList.length > 0 && !this.cangid) {
|
|
|
+ this.warehouseName = this.warehouseList[0].value
|
|
|
+ this.warehouseCount = this.warehouseList[0].count
|
|
|
+ this.warehouseNo = this.warehouseList[0].No
|
|
|
+ this.cangid = this.warehouseList[0].warehouseId
|
|
|
+ this.allowEdit = this.warehouseList[0].allowEdit
|
|
|
+ this.WAREHOUSE[1].payname = this.warehouseList[0].value
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getReceiptTaskNo({
|
|
|
+ flag: 2,
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
+ agentKey: localStorage.getItem('ws-pf_userId'),
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ console.log(response)
|
|
|
+ this.taskNolist = response
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ closePrint() {
|
|
|
+ this.isShowPrint = false
|
|
|
+
|
|
|
+ },
|
|
|
+ warehousetypechange(status){
|
|
|
+ this.serviceManagementType=status
|
|
|
+ if(status==3){
|
|
|
+ this.deptBudgetList.qualityNo='SGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 默认按钮暂时不用
|
|
|
+ // checkchange(e){
|
|
|
+ // if(e){
|
|
|
+ // for (let i = 0; i < this.warehouseList.length; i++) {
|
|
|
+ // if (this.warehouseList[i].value == this.warehouseName) {
|
|
|
+ // this.warehouseName = this.warehouseList[i].value
|
|
|
+ // this.warehouseCount = this.warehouseList[i].count
|
|
|
+ // this.warehouseNo = this.warehouseList[i].No
|
|
|
+ // this.cangid = this.warehouseList[i].warehouseId
|
|
|
+ // this.allowEdit = this.warehouseList[i].allowEdit
|
|
|
+ // this.WAREHOUSE[1].payname = this.warehouseList[i].value
|
|
|
+ // this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
|
|
|
+ // localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ find() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ contractNoChange(e) {
|
|
|
+ // 循环任务编号获取合同号
|
|
|
+ for (let i = 0; i < this.taskNolist.length; i++) {
|
|
|
+ if (this.taskNolist[i].inOutTaskNo == e) {
|
|
|
+ console.log(this.taskNolist[i])
|
|
|
+ var data = this.taskNolist[i]
|
|
|
+
|
|
|
+ if (this.taskNolist[i].contractNo) {
|
|
|
+ this.deptBudgetList.contractNo = this.taskNolist[i].contractNo
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.contractNo = this.taskNolist[i].moveTaskNo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!data) return
|
|
|
+ for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
+ if (
|
|
|
+ this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
+ ) {
|
|
|
+ console.log(this.outContractNo[i])
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
+ this.deptBudgetList.grade = this.outContractNo[i].grade
|
|
|
+ if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
+ this.deptBudgetList.qualityNo='CGRK'+this.getTime()+this.warehouseNo+this.warehouseCount
|
|
|
+ if (!this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips ='卖方' +this.outContractNo[i].seller +'( ' + this.outContractNo[i].unitContractPrice +'元/吨)'
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutTypeKey = 1
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.deptBudgetList.qualityNo='YKRK'+this.getTime()+this.warehouseNo+this.warehouseCount
|
|
|
+ this.deptBudgetList.goodsName = data.goodsName
|
|
|
+ this.deptBudgetList.goodsNameKey = data.goodsNameKey
|
|
|
+ this.deptBudgetList.grade = data.grade
|
|
|
+ if (this.outContractNo[i].unitContractPrice) {
|
|
|
+ this.deptBudgetList.tips ='出货库' +data.sendWarehouse +' (' +this.outContractNo[i].unitContractPrice +'元/吨)'
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutTypeKey = 3
|
|
|
+ } else if (this.outContractNo[i].inOutType == '移库出库') {
|
|
|
+
|
|
|
+ this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
|
+ } else if (this.outContractNo[i].inOutType == '暂存入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 4
|
|
|
+ } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
|
|
|
+ this.deptBudgetList.inOutTypeKey = 5
|
|
|
+ } else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
+ if (this.outContractNo[i].contractNo) {
|
|
|
+ this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutTypeKey = 6
|
|
|
+ }
|
|
|
+ this.cost = this.outContractNo[i].contractPrice
|
|
|
+ if (this.cost) {
|
|
|
+ this.isGetCost = true
|
|
|
+ this.deptBudgetList.cost =this.cost - this.deptBudgetList.deductionAmount
|
|
|
+ } else {
|
|
|
+ this.isGetCost = false
|
|
|
+ this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
|
+ }
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
+ if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
+ this.isSelectType = false
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.isSelectType = true
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].priceType == '随行就市') {
|
|
|
+ this.disabled1 = !this.disabled1
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.outContractNo[i].deliverType == '1') {
|
|
|
+ this.carstatus = true
|
|
|
+ } else {
|
|
|
+ this.carstatus = false
|
|
|
+ }
|
|
|
+ if (this.outContractNo[i].tranCarInfoList) {
|
|
|
+ this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
+ // this.carstatus = true
|
|
|
+ }
|
|
|
+ this.fleetNameList=this.outContractNo[i].tranCarInfoList1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectstorageType(){
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ warehouseNameChange(e) {
|
|
|
+ for (let i = 0; i < this.warehouseList.length; i++) {
|
|
|
+ if (this.warehouseList[i].value == e) {
|
|
|
+ this.warehouseName = this.warehouseList[i].value
|
|
|
+ this.warehouseCount = this.warehouseList[i].count
|
|
|
+ this.warehouseNo = this.warehouseList[i].No
|
|
|
+ this.cangid = this.warehouseList[i].warehouseId
|
|
|
+ this.allowEdit = this.warehouseList[i].allowEdit
|
|
|
+ this.WAREHOUSE[1].payname = this.warehouseList[i].value
|
|
|
+ this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
|
|
|
+ localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
|
|
|
+ getReceiptTaskNo({
|
|
|
+ flag: 2,
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
+ agentKey: localStorage.getItem('ws-pf_userId'),
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ console.log(response)
|
|
|
+ this.taskNolist = response
|
|
|
+ })
|
|
|
+
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.warehouseList1.length; i++) {
|
|
|
+ if (this.warehouseList1[i].warehouseName == e) {
|
|
|
+ this.positionInfos=this.warehouseList1[i].positionInfos
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.positionInfos)
|
|
|
+ if(this.warehouseName){
|
|
|
+ getReceiptTaskNo({
|
|
|
+ flag: 2,
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
+ agentKey: localStorage.getItem('ws-pf_userId'),
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.taskNolist = response
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectpackingMethod(e) {
|
|
|
+ for (var i = 0; i < this.gradeList.length; i++) {
|
|
|
+ if (this.gradeList[i].constValue == e) {
|
|
|
+ this.deptBudgetList.gradeKey = this.gradeList[i].constKey
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.waterContentChange()
|
|
|
+ },
|
|
|
+ reselectpackingMethod(e) {
|
|
|
+ for (var i = 0; i < this.gradeList.length; i++) {
|
|
|
+ if (this.gradeList[i].constValue == e) {
|
|
|
+ this.deptBudgetList.reGradeKey = this.gradeList5 [i].constKey
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ // 类型
|
|
|
+ this.storageType = []
|
|
|
+ console.log(this.storageType)
|
|
|
+ pullDown({
|
|
|
+ constId: 'CON5',
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.storageType = response
|
|
|
+ // for (let i = 0; i < response.length; i++) {
|
|
|
+ // if (
|
|
|
+ // response[i].constValue == '移库入库' ||
|
|
|
+ // response[i].constValue == '退库'
|
|
|
+ // ) {
|
|
|
+ // this.storageType.push(response[i])
|
|
|
+ // console.log(this.storageType)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ })
|
|
|
+ getinspectLookGoods({
|
|
|
+ warehouseId: this.cangid
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.goodnameList = response
|
|
|
+ this.purchasePriceList = response
|
|
|
+ })
|
|
|
+ // 品级
|
|
|
+ pullDown({
|
|
|
+ constId: 'CON3',
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.gradeList = response
|
|
|
+ })
|
|
|
+ //合同编号
|
|
|
+ xialaNo({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ flag: 7,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.options1 = response
|
|
|
+ this.outContractNo = response
|
|
|
+ })
|
|
|
+ this.multiSelector1=[]
|
|
|
+ getinspectcontractno({compId:localStorage.getItem('ws-pf_compId'),warehouseName:this.warehouseName}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if(response.contractManagementInfoList){
|
|
|
+ for (let i = 0; i < response.contractManagementInfoList.length; i++) {
|
|
|
+ response.contractManagementInfoList[i].type='自运'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.multiSelector1=response.contractManagementInfoList
|
|
|
+ // this.options1 = response
|
|
|
+ // this.outContractNo = response
|
|
|
+ })
|
|
|
+ getinspectList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ warehouseName: this.warehouseName,
|
|
|
+ managementType: 1,
|
|
|
+ serviceManagementType:this.serviceManagementType
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.inspect = response.records
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
+ // this.$forceUpdate();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ /deep/.el-dialog__header {
|
|
|
+ text-align: center !important;
|
|
|
+ padding: 10px 0 !important;
|
|
|
+ height: auto !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-dialog__title {
|
|
|
+ font-size: 24px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 600;
|
|
|
+ margin: 20px 0 0 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tit {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ margin: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ws-info-table {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ws-info-table .el-form-item {
|
|
|
+ width: 50%;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
|
+ width: 30%;
|
|
|
+ text-align: center;
|
|
|
+ background: #ffffff;
|
|
|
+ color: #8890b1;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+ /deep/.el-textarea__inner{
|
|
|
+ width:92%;
|
|
|
+ }
|
|
|
+ /deep/.ws-info-table .el-form-item.rememo .el-form-item__content{
|
|
|
+ height:76px;
|
|
|
+ }
|
|
|
+</style>
|