12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196 |
- <template>
- <view ref="all-input">
- <view @click='hidden' class='wrap'>
- <view class='title_b'>基本信息</view>
- <view class="c-row ">
- <view class="title">入库类型</view>
- <view class="con-list">
- <view v-if='gridList.serviceManagementType==1'>贸易入库</view>
- <view v-if='gridList.serviceManagementType==3'>收购入库</view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">仓库</view>
- <view class="con-list">
- {{gridList.warehouseName}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">任务编号</view>
- <view class="con-list">
- <view >{{gridList.inOutTaskNo}}</view>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&gridList.inOutType!="移库入库"' class="c-row ">
- <view class="title">合同编号</view>
- <view class="con-list">
- {{gridList.contractNo}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1&&gridList.inOutType=="移库入库"' class="c-row ">
- <view class="title">移库编号</view>
- <view class="con-list">
- {{gridList.contractNo}}
- </view>
- </view>
- <view class="c-row ">
- <view class="title">业务编号</view>
- <view class="con-list">
- {{gridList.qualityNo}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">成本</view>
- <view class="con-list">
- <view v-if='!coststatus'>{{gridList.cost?gridList.cost:'自动获取,不可编辑'}}</view>
- <view v-if='coststatus'>
- <input v-model='gridList.cost' placeholder="请输入成本" name="input" type="digit"></input>
- </view>
- </view>
- <button class='cu-btn bg-green shadow' @click="changecost">{{costtext}}</button>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">运费</view>
- <view class="con-list flex">
- <view v-if='!freightstatus'>{{gridList.freight?gridList.freight:'自动获取,不可编辑'}}</view>
- <view v-if='freightstatus'>
- <input v-model='gridList.freight' placeholder="请输入运费" name="input" type="digit"></input>
- </view>
- </view>
- <button class='cu-btn bg-green shadow' @click="changefreight">{{freighttext}}</button>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">扣款</view>
- <view class="con-list">
- <input v-model='gridList.deductionAmount' placeholder="请输入扣款" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">入库类型</view>
- <view class="con-list">
- {{gridList.inOutType?gridList.inOutType:'自动获取,不可编辑'}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">入库日期</view>
- <view class="con-list">
- <view @click='show5=true'>{{gridList.inOutDate?gridList.inOutDate:'请选择入库日期'}}</view>
- <u-picker @confirm='inOutDatepicker($event)' :params="params" v-model="show5"
- mode="time">
- </u-picker>
- </view>
- </view>
-
- <view v-if='gridList.serviceManagementType==3' class="c-row ">
- <view class="title">客户</view>
- <view class="con-list">
- <view @click='gocustomer'>
- {{gridList.customerName}}({{gridList.customerPhone}})
- </view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">车牌号</view>
- <view class="con-list">
- <input v-model='gridList.carNumber' @click.stop="handleShowKeyboard" placeholder="请输入车牌号"
- name="input"></input>
- <master-keyboard ref="keyboard" keyboardtype="car" :randomNumber="true" :newCar="false"
- :defaultValue="gridList.carNumber" @keyboardClick="handleClick"></master-keyboard>
- <!-- <input :disabled='flag==1' v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input> -->
- </view>
- </view>
- <!-- <view v-if="gridList.paramType != '1'" class="c-row ">
- <view class="title">扣重比</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
- name="input"></input>
- </view>
- </view>
- <view v-else class="c-row ">
- <view class="title">扣杂</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂"
- @input="waterContentChange" name="input"></input>
- <input v-if='flag==0' value='未复检' disabled placeholder="复检扣杂" name="input"></input>
- <input v-else :disabled='flag!=1' v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂"
- name="input"></input>
- </view>
- </view> -->
- <view v-if='gridList.serviceManagementType==3' class="c-row ">
- <view class="title">购粮性质</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">仓位号</view>
- <view class="con-list">
- <view v-if='flag!=1' @click='show=true'>{{gridList.binNumber}}</view>
- <view v-else>{{gridList.binNumber}}</view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">囤位号</view>
- <view class="con-list">
- <input v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">货名</view>
- <view class="con-list">
- <!-- <view v-if="flag != '0'">
- {{gridList.goodsName}}
- </view> -->
- <view @click='goodsName = true'>{{gridList.goodsName}}</view>
- <u-picker :range="goodsList" range-key="goodsName" @confirm='goodsPicker($event)'
- v-model="goodsName" mode="selector">
- </u-picker>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">类型</view>
- <view class="con-list">
- {{gridList.type}}
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view @click='show7=true'>{{gridList.outType?gridList.outType:'请选择运输方式'}}</view>
- <u-picker :range="multiSelector" range-key="name" @confirm='outtypepicker($event,0)' v-model="show7"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==3' class="c-row ">
- <view class="title">运输方式</view>
- <view class="con-list">
- <view @click='show8=true'>{{outType?outType:'请选择运输方式'}}</view>
- <u-picker :range="multiSelector1" range-key="name" @confirm='outtypepicker($event,1)' v-model="show8"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if='gridList.serviceManagementType==1||gridList.serviceManagementType==3&&gridList.outType=="自运"' class="c-row ">
- <view class="title">车队</view>
- <view class="con-list">
- <view @click='show6=true'>{{gridList.fleet?ridList.fleet:'非车队车辆'}}</view>
- <u-picker @confirm='fleetpicker($event)' :range="fleetNameList" range-key="fleetName" v-model="show5"
- mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType=='汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.outType== '汽运'&&gridList.serviceManagementType==1 ||gridList.outType == '集装箱船'&&gridList.serviceManagementType==1" class="c-row ">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3" class="c-row">
- <view class="title">箱号-1</view>
- <view class="con-list">
- <input v-model='gridList.boxNo' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3" class="c-row">
- <view class="title">封号-1</view>
- <view class="con-list">
- <input v-model='gridList.titleNo' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3" class="c-row">
- <view class="title">箱号-2</view>
- <view class="con-list">
- <input v-model='gridList.boxNoOther' placeholder="请输入箱号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.serviceManagementType==3" class="c-row">
- <view class="title">封号-2</view>
- <view class="con-list">
- <input v-model='gridList.titleNoOther' placeholder="请输入封号" name="input" type="digit"></input>
- </view>
- </view>
- <view v-if="gridList.type == '潮粮'&&gridList.serviceManagementType==3" class="c-row">
- <view class="title">净重单价(元/公斤)</view>
- <view class="con-list">
- <input :disabled='flag==1&&pricedisabled' v-model='gridList.tidalGrainPrice' @blur='inputprice' placeholder="自动获取,不可编辑"
- name="input"></input>
- </view>
- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
- </view>
- <view v-if="gridList.type == '干粮'&&gridList.serviceManagementType==3" class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list">
- <input v-model='gridList.dryGrainPrice' :disabled='pricedisabled' type="digit" @blur='inputprice' placeholder="请输入干粮单价" name="input"></input>
- </view>
- <button class='cu-btn bg-green shadow' @click="changeprice">{{pricetext}}</button>
- </view>
- <view class="c-row-fj" v-if="flag==2||flag==1">
- <view style="margin: 0px 0px 30rpx 10rpx;">复检备注</view>
- <textarea class='textarea-style' v-model='gridList.reMemo' placeholder="请输入复检备注"
- maxlength="300"></textarea>
- </view>
- <view class="c-row" v-if="flag==1&&gridList.warehouseName=='鲅鱼圈金信库'">
- <view class="title">车型</view>
- <view class="con-list">
- <view @click='carstatus = true'>{{gridList.carModel?gridList.carModel:'请选择车型'}}</view>
- <u-picker :range="carModeList" range-key="constValue" @confirm='carPicker($event)'
- v-model="carstatus" mode="selector">
- </u-picker>
- </view>
- </view>
- <view v-if="gridList.type == '干粮'" class="c-row">
- <view class="title">干粮单价(元/公斤)</view>
- <view class="con-list" @click="setPrice">
- {{gridList.dryGrainPrice}}
- </view>
- </view>
- </view>
- <view style='padding-bottom:300rpx;'>
- <view class='wrap'>
- <view style='margin-right:10px;' class='flex justify-between align-item-center'>
- <view class='title_b'>化验信息</view>
- <view class='flex justify-between align-item-center'>补录:<u-switch activeColor="#22C572"
- v-if='flag==0' v-model="value" @change="change"></u-switch>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">等级</view>
- <view class="con-list">
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
- mode="selector">
- </u-picker>
- <view v-if='flag!=1' @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
- <view v-else>{{gridList.grade}}</view>
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker1($event)' v-model="show2"
- mode="selector">
- </u-picker>
- <view v-if='flag==1' @click='show2=true'>{{gridList.reGrade?gridList.reGrade:'请选择等级'}}</view>
- <view v-else>{{gridList.reGrade}}</view>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">水分(%)</view>
- <view class="con-list">
- <input :disabled='flag==1' v-model='gridList.waterContent' placeholder="初检水分"
- @input="waterContentChange" type="digit" name="input"></input>
- <input v-if='flag==0' value='未复检' disabled placeholder="复检水分" name="input"></input>
- <input :disabled='flag!=1' type="digit" v-else v-model='gridList.reWaterContent' placeholder="复检水分"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">容重(克/升)</view>
- <view class="con-list">
- <input :disabled='flag==1' type="digit" v-model='gridList.bulkDensity' placeholder="请输入容重"
- name="input"></input>
- <input :disabled='flag!=1' type="digit" v-model='gridList.reBulkDensity' placeholder="请输入容重"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">不完善粒(%)</view>
- <view class="con-list">
- <input :disabled='flag==1' type="digit" v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
- name="input"></input>
- <input :disabled='flag!=1' type="digit" v-model='gridList.reImperfectGrain' placeholder="请输入不完整粒占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">杂质(%)</view>
- <view class="con-list">
- <input :disabled='flag==1' type="digit" v-model='gridList.impurity' placeholder="请输入杂质占比"
- name="input"></input>
- <input :disabled='flag!=1' type="digit" v-model='gridList.reImpurity' placeholder="请输入杂质占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">霉变粒(%)</view>
- <view class="con-list">
- <input :disabled='flag==1' type="digit" v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
- name="input"></input>
- <input :disabled='flag!=1' type="digit" v-model='gridList.reMildewGrain' placeholder="请输入霉变粒占比"
- name="input"></input>
- </view>
- </view>
- <view class="c-row ">
- <view class="title">热损伤(%)</view>
- <view class="con-list">
- <input :disabled='flag==1' type="digit" v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
- name="input"></input>
- <input :disabled='flag!=1' type="digit" v-model='gridList.reJiaorenli' placeholder="请输入热损伤占比"
- name="input"></input>
- <!-- <input v-model='gridList.jiaorenli' @click.stop="handleShowKeyboard1":disabled="true" placeholder="请输入热损伤占比" name="input"></input> -->
- </view>
- </view>
- </view>
- </view>
- <view class="footer">
- <view v-if='flag==1' @click='confirmInfo' class="button">确认初检信息</view>
- <view @click='submit' class="button">提交</view>
- </view>
- <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
- :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
- showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
- <u-popup v-model="isShowPrint" class="popup" @close="close" mode="bottom" border-radius="30" :closeable="true">
- <view class="buns_item">
- <view class="but_css" @click="print">打印小票</view>
- <view class="but_css" @click="close">返回</view>
- </view>
- </u-popup>
- <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
- v-model="show" mode="selector">
- </u-picker>
- </view>
- </template>
- <script>
- import dragButton from "@/components/drag-button/drag-button.vue";
- import keyboard from "@/components/master-keyboard/master-keyboard.vue";
- import {
- mapState
- } from 'vuex';
- let startY = 0,
- moveY = 0,
- pageAtTop = true;
- export default {
- components: {
- dragButton,
- keyboard
- },
- data() {
- return {
- isShowPrint: false,
- inputShow: false,
- modalName: '',
- mycarStyle: '',
- feild: undefined,
- id: 0,
- show: false,
- show2:false,
- show4:false,
- show5:false,
- show7:false,
- show8:false,
- pricedisabled:false,
- multiSelector1:[{name:'他运',value:'他运'}],
- outType:'',
- selector: [],
- show1: false,
- pricetext:'锁定',
- goodsName: false,
- carstatus: false,
- params:{year: true,
- month: true,
- day: true,},
- inputContent: '',
- multiSelector: [{
- name: '汽运',
- value: '0',
- },
- {
- name: '火运',
- value: '1',
- },
- {
- name: '集装箱船',
- value: '2',
- },
- {
- name: '散船',
- value: '3',
- },
- ],
- coverTransform: 'translateY(0px)',
- coverTransition: '0s',
- moving: false,
- footprintList: [],
- searchKeyWord: '',
- isVip: false,
- flag: 0,
- freightstatus:false,
- coststatus:false,
- freighttext:'手动填写',
- costtext:'手动填写',
- userInfoTmp: [],
- inputStatus: 'none',
- carInfo: [],
- gridCol: 4,
- pageSize: 10,
- currentPage: 1,
- gridBorder: false,
- headUrl: "../../static/img/myimg/YongHu@3x.png",
- userphone: "",
- username: "请更改昵称",
- gridList: {
- natureOfGrainPurchase: '贸易粮',
- type: '潮粮',
- tidalGrainPrice: '',
- dryGrainPrice: '',
- carNumber: '',
- carModel: '',
- },
- managementType: '',
- warehouseName: '',
- warehouseList: [],
- showTran: true,
- companyId: 1,
- current: 4,
- value: false,
- carModeList: [],
- fleetNameList:[],
- gradeList: [{
- key: 1,
- value: '一等品'
- },
- {
- key: 2,
- value: '二等品'
- },
- {
- key: 3,
- value: '三等品'
- },
- {
- key: 4,
- value: '等外'
- },
- ],
- cangid: '',
- goodsList: [],
- taskNolist:[],
- isShowAlert: false,
- content: '确认初检信息后,初检员不需要再次确认质检信息,是否确定提交?',
- }
- },
- // #ifndef MP
- onNavigationBarButtonTap(e) {
- const index = e.index;
- if (index === 0) {
- this.navTo('/pages/set/set');
- } else if (index === 1) {
- // #ifdef APP-PLUS
- const pages = getCurrentPages();
- const page = pages[pages.length - 1];
- const currentWebview = page.$getAppWebview();
- currentWebview.hideTitleNViewButtonRedDot({
- index
- });
- // #endif
- uni.navigateTo({
- url: '/pages/notice/notice'
- })
- }
- },
- // #endif
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- // 手机号中间4位加*
- starUserphone() {
- let reg = /^(\d{3})\d{4}(\d{4})$/;
- if (this.userphone) {
- return this.userphone.replace(reg, "$1****$2");
- }
- }
- },
- onLoad(options) {
- this.id = options.id
- this.flag = options.flag
- this.cangid = options.cangid
- this.warehouseName=options.warehouseName
- this.managementType = options.managementType
- console.log(this.flag)
- var that = this
- this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection', {
- id: this.id
- }).then(res => {
- if (res.data.data) {
- let data = res.data.data
- if (data.supplementaryRecording == 1) {
- that.value = true
- } else {
- that.value = false
- }
- that.gridList = data
- if(!that.gridList.reGrade){
- that.gridList.reGrade=that.gridList.grade
- }
- if(!that.gridList.reWaterContent){
- that.gridList.reWaterContent=that.gridList.waterContent
- }
- if(!that.gridList.reBulkDensity){
- that.gridList.reBulkDensity=that.gridList.bulkDensity
- }
- if(!that.gridList.reImperfectGrain){
- that.gridList.reImperfectGrain=that.gridList.imperfectGrain
- }
- if(!that.gridList.reImpurity){
- that.gridList.reImpurity=that.gridList.impurity
- }
- if(!that.gridList.reMildewGrain){
- that.gridList.reMildewGrain=that.gridList.mildewGrain
- }
- if(!that.gridList.reJiaorenli){
- that.gridList.reJiaorenli=that.gridList.jiaorenli
- }
- that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
- id: this.cangid
- }).then(res => {
- that.warehouseList = res.data.data.warehousePositionInfoList
- })
- }
- })
- this.$api.doRequest('get', 'commonSysParameter/getInfo', {
- constId: 'QUA1'
- }).then(res => {
- if (res.data.data) {
- that.carModeList = res.data.data
- }
- })
- //质检货名下拉
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
- warehouseId: this.cangid
- }).then(res => {
- if (res.data.data) {
- this.goodsList = res.data.data
- }
- })
- this.gridList.grade = this.gradeList[0].value
- this.gridList.gradeKey = this.gradeList[0].key
- },
- onShow() {
- this.multiSelector1=[]
- this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
- warehouseName:this.warehouseName
- }).then(res => {
- // console.log(res)
- if(res.data.data.contractManagementInfoList){
- for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
- res.data.data.contractMangementInfoList[i].name='自运 ('+
- res.data.data.contractMangementInfoList[i].contractNo+' '+res.data.data.contractMangementInfoList[i].seller+')'
- this.multiSelector1.push(res.data.data.contractManagementInfoList[i])
- }
- }
- // this.taskNolist=res.data.data
- })
- // uni.showLoading({title: '加载中'})
- // this.$api.doRequest('get', '/inOutWarehouseTask/selectInOutWarehouseNo', {
- // flag: 2,
- // warehouseName:this.warehouseName
- // }).then(res => {
- // console.log(res)
- // uni.hideLoading();
- // this.taskNolist=res.data.data
- // })
- let _kh = uni.getStorageSync('isClick')
- if (uni.getStorageSync('checkcustomer') && _kh) {
- let _customerInfo = uni.getStorageSync('checkcustomer')
- if (_customerInfo.shipperName) {
- this.gridList.identityId = _customerInfo.id
- //点击登记客户
- this.gridList.customerName = _customerInfo.shipperName
- this.gridList.customerPhone = _customerInfo.shipperPhone
- this.gridList.carNumber = _customerInfo.carNo
- } else {
- //点击搜索客户
- this.gridList.customerName = _customerInfo.customerName
- this.gridList.customerPhone = _customerInfo.customerPhone
- }
- this.gridList.customerNumberCard = _customerInfo.customerNumberCard
- }
- },
- methods: {
- changeprice(){
- if(this.pricetext=='解锁'){
- this.pricedisabled=false
- this.pricetext='锁定'
- }else{
- this.pricedisabled=true
- this.pricetext='解锁'
- }
- },
- inputprice(){
- if(this.pricetext=='锁定'){
- this.pricedisabled=true
-
- this.pricetext='解锁'
- }
- },
- inOutDatepicker(e){
- this.gridList.inOutDate=e.year+'-'+e.month+'-'+e.day
- console.log(e)
- },
- fleetpicker(e){
- this.gridList.fleet=this.fleetNameList[e[0]].fleetName
- },
- changefreight(){
- this.freightstatus=!this.freightstatus
- if(this.freightstatus){
- this.freighttext='自动获取'
- }else{
- this.freighttext='手动填写'
- }
- },
- changecost(){
- this.coststatus=!this.coststatus
- if(this.coststatus){
- this.costtext='自动获取'
- }else{
- this.costtext='手动填写'
- }
- },
- gocustomer() {
- uni.navigateTo({
- url: '/pages/erpbusiness/customer?cangid=' + this.cangid + '&warehouseName=' + this.gridList
- .warehouseName + '&goodsName=' + this.gridList.goodsName + '&status=edit'
- })
- },
- print() {
- uni.navigateTo({
- url: '/pages/erpbusiness/bleConnect'
- })
- },
- close() {
- this.isShowPrint = false
- uni.navigateBack({})
- },
- // focusConfig(type){
- // console.log('childclick',type)
- // // 0是上一项
- // if(type==0){
- // }else{}
- // },
- hidden() {
- this.$refs.keyboard.open(false)
- },
- carPicker(e) {
- this.gridList.carModel = this.carModeList[e[0]].constValue
- },
- handleShowKeyboard() {
- if (this.flag == 0) {
- if (this.$refs.keyboard.open) {
- this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard[0].open(true)
- }
- }
- },
- handleShowKeyboard1() {
- if (this.flag == 0) {
- if (this.$refs.keyboard1.open) {
- this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
- } else {
- this.$refs.keyboard1[0].open(true)
- }
- }
- },
- handleClick(e) {
- this.gridList.carNumber = e.value //键盘输入值
- },
- handleClick1(e) {
- this.gridList.jiaorenli = e.value //键盘输入值
- },
- change(e) {
- if (e) {
- this.gridList.supplementaryRecording = 1
- } else {
- this.gridList.supplementaryRecording = 0
- }
- },
- confirmInfo() {
- this.isShowAlert = true
- },
- alertBtn() {
- var that = this
- that.gridList.reWaterContent = that.gridList.waterContent
- if (that.gridList.buckleMiscellaneous) {
- that.gridList.reBuckleMiscellaneous = that.gridList.buckleMiscellaneous
- }
- that.gridList.flag = 1
- this.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', that.gridList).then(
- res => {
- if (res.data.code == "200") {
- that.$api.doRequest('post', '/qualityInspectionManagement/api/editQualityInspection', {
- id: that.gridList.id,
- flag: 2
- }).then(res => {
- if (res.data.code == "200") {
- that.$api.msg('提交成功!')
- setTimeout(function() {
- uni.navigateBack({})
- }, 1000)
- } else {
- that.$api.msg('提交失败')
- }
- })
- } else {
- that.$api.msg('提交失败')
- }
- })
- },
- waterContentChange() {
- var that = this
- if (this.gridList.goodsName && this.cangid) {
- if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName
- }).then(res => {
- that.gridList.dryGrainPrice = res.data.data
- })
- }
- }
- if (this.gridList.goodsName) {
- for (var i = 0; i < this.purchasePriceList.length; i++) {
- if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
- this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
- this.gridList.paramType = this.purchasePriceList[i].paramType
- }
- }
- }
- var numReg = /^[0-9]*$/
- var numRe = new RegExp(numReg)
- //潮粮单价改变事件
- if (
- this.gridList.goodsName &&
- this.gridList.waterContent &&
- this.gridList.grade &&
- numRe.test(this.gridList.waterContent)
- ) {
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
- warehouseId: this.cangid,
- goodsName: this.gridList.goodsName,
- waterContent: this.gridList.waterContent,
- grade: this.gridList.grade,
- }).then(res => {
- if (that.gridList.paramType == '1') {
- that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
- .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
- .dryGrainPrice)).toFixed(4)
- if (!that.gridList.tidalGrainPrice) {
- that.gridList.tidalGrainPrice = ''
- }
- } else {
- that.gridList.tidalGrainPrice = res.data.data
- }
- })
- }
- },
- goodsPicker(e) {
- this.gridList.goodsName = this.goodsList[e[0]].goodsName
- },
- submit() {
- this.gridList.statusFlag=1
- if(this.gridList.serviceManagementType==3){
- if(this.outType){
- this.gridList.outType=this.outType
- }
- }else{
- this.gridList.customerName = ''
- }
- this.gridList.flag = this.flag
- // if(this.flag==2){
- // this.gridList.reInspector=this.userInfo.userName
- // }
- var that = this
- if (!this.gridList.qualityNo) {
- this.$api.msg('编号不能为空')
- return
- }
- if (!this.gridList.binNumber) {
- this.$api.msg('仓位不能为空')
- return
- }
- if(this.gridList.serviceManagementType==3){
- if (!this.gridList.customerName) {
- this.$api.msg('客户不能为空')
- return
- }
- }
-
- // if (!this.gridList.storageTagNo) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- // if (this.gridList.storageTagNo.length > 10) {
- // this.$api.msg('囤位号不能为空')
- // return
- // }
- if (!this.gridList.carNumber) {
- this.$api.msg('车牌号不能为空')
- return
- }
- if (this.gridList.carNumber.length > 7) {
- this.$api.msg('车牌号输入错误')
- return
- }
- if (!this.gridList.goodsName) {
- this.$api.msg('货名不能为空')
- return
- }
- if (this.gridList.paramType != 1 && this.gridList.buckleWeightRatio < 0 || this.gridList.paramType != 1 &&
- this.gridList.buckleWeightRatio > 2) {
- this.$api.msg('扣重比输入错误')
- return
- }
- if (
- this.gridList.paramType != 1 && String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
- String(this.gridList.buckleWeightRatio).length -
- (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
- this.$api.msg('扣重比输入错误')
- return
- }
- if (this.flag == 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous < 0 || this.flag ==
- 0 && this.gridList.paramType == 1 && this.gridList.buckleMiscellaneous > 50) {
- this.$api.msg('初检扣杂输入错误')
- return
- }
- if (this.flag == 1 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous < 0 || this
- .flag == 0 && this.gridList.paramType == 1 && this.gridList.reBuckleMiscellaneous > 50) {
- this.$api.msg('复检扣杂输入错误')
- return
- }
- if (!this.gridList.type) {
- this.$api.msg('类型不能为空')
- return
- }
- if (this.value == false || this.flag == 2) {
- if (!this.gridList.grade) {
- this.$api.msg('等级不能为空')
- return
- }
- if (!this.gridList.impurity) {
- this.$api.msg('杂质不能为空')
- return
- }
- if (!this.gridList.waterContent) {
- this.$api.msg('初检水分不能为空')
- return
- }
- // if (!this.gridList.reWaterContent) {
- // this.$api.msg('复检水分不能为空')
- // return
- // }
- if (!this.gridList.mildewGrain) {
- this.$api.msg('霉变粒不能为空')
- return
- }
- if (!this.gridList.bulkDensity) {
- this.$api.msg('容重不能为空')
- return
- }
- if (!this.gridList.jiaorenli) {
- this.$api.msg('热损伤不能为空')
- return
- }
- if (!this.gridList.imperfectGrain) {
- this.$api.msg('不完整粒不能为空')
- return
- }
- }
- this.gridList.storageNumber = this.gridList.storageTagNo
- that.gridList.warehouseInOutDetail={
- id:that.gridList.warehouseInOutId,
- grade:that.gridList.grade,
- reGrade:that.gridList.grade,
- waterContent:that.gridList.waterContent,
- reWaterContent:that.gridList.reWaterContent,
- imperfectGrain:that.gridList.imperfectGrain,
- reImperfectGrain:that.gridList.reImperfectGrain,
- impurity:that.gridList.impurity,
- reImpurity:that.gridList.reImpurity,
- jiaorenli:that.gridList.jiaorenli,
- reJiaorenli:that.gridList.reJiaorenli,
- bulkDensity:that.gridList.bulkDensity,
- reBulkDensity:that.gridList.reBulkDensity,
- mildewGrain:that.gridList.mildewGrain,
- reMildewGrain:that.gridList.reMildewGrain,
- }
- uni.showModal({
- content: "确定提交质检信息?",
- showCancel: true,
- confirmText: '提交',
- success: function(res) {
- if (res.confirm) {
- that.$api.doRequest('post',
- '/qualityInspectionManagement/api/editQualityInspection', that.gridList)
- .then(res => {
- that.$api.doRequest('post',
- '/warehouseInOutInfo/InOutWarehouse',
- that.gridList)
- .then(res => {
- if (res.data.code == 200) {
- that.$api.msg('编辑质检成功')
- that.gridList.warehouseId = that.cangid
- uni.setStorageSync("quality_print", that.gridList)
- console.log('that.gridList', that.gridList)
- that.isShowPrint = true
- // uni.getStorageSync("depotAcquisition_warehouseName")
- // uni.navigateBack({})
- }
- })
- })
- }
- }
- })
- },
- gradepicker(e) {
- console.log(e)
- // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
- this.gridList.grade = this.gradeList[e[0]].value
- this.gridList.gradeKey = this.gradeList[e[0]].key
- this.waterContentChange()
- },
- gradepicker1(e) {
- console.log(e)
- // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
- this.gridList.reGrade = this.gradeList[e[0]].value
- this.gridList.reGradeKey = this.gradeList[e[0]].key
- },
- binNumberpicker(e) {
- this.gridList.binNumber = this.warehouseList[e[0]].binNumber
- },
- del(item) {
- this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
- id: item.id
- }).then(res => {
- if (res.data.code == 200) {
- this.$api.msg('删除成功')
- } else {
- this.$api.msg('系统异常,请联系管理员')
- }
- })
- },
- contactUs() {
- const that = this
- uni.makePhoneCall({
- // 手机号
- phoneNumber: '18241771147',
- // 成功回调
- success: (res) => {},
- // 失败回调
- fail: (res) => {}
- });
- },
- loadData() {
- // const that = this
- // if(uni.getStorageSync("PageCur")){
- // that.PageCur = uni.getStorageSync("PageCur");
- // }
- // that.userInfoTmp = uni.getStorageSync("userInfo")
- // uni.showLoading({
- // title: '正在加载',
- // mask:true
- // })
- // that.$api.request('integral', 'getIndexData', failres => {
- // that.$api.msg(failres.errmsg)
- // uni.hideLoading()
- // }).then(res => {
- // let data = res.data
- // uni.setStorageSync("message", data.message);
- // uni.setStorageSync("task", data.task);
- // uni.setStorageSync("contract", data.contract);
- // uni.setStorageSync('showTran', data.showTran);
- // that.showTran = data.showTran
- // that.gridList[4].tips = data.task
- // that.gridList[2].tips = data.contract
- // that.companyId = data.companyId
- // uni.hideLoading()
- // })
- },
- confirm() {
- const that = this
- if (!that.inputContent) {
- that.$api.msg('输入不能为空')
- return
- }
- let obj = {}
- obj[that.feild] = that.inputContent
- that.$api.request('user', 'syncUserInfo', obj).then(res => {
- that.userInfo.nickname = that.inputContent
- that.inputContent = ''
- that.$store.commit('login', that.userInfo)
- })
- },
- cancel() {
- this.inputShow = false
- this.inputStatus = 'none'
- this.genderShow = false
- },
- myAccount() {
- uni.navigateTo({
- url: `/pageA/pages/contract`
- })
- },
- /**
- * 统一跳转接口,拦截未登录路由
- * navigator标签现在默认没有转场动画,所以用view
- */
- navTo(url) {
- if (!this.hasLogin) {
- url = '/pages/public/login';
- }
- uni.navigateTo({
- url
- })
- },
- mycarClick(carNo) {
- this.modalName = null
- uni.navigateTo({
- url: `/pageB/car/mycar_detail?carNo=${carNo}`
- })
- },
- scanCode() {
- uni.scanCode({
- success: function(res) {
- uni.navigateTo({
- url: res.result
- })
- }
- })
- },
- hideModal(e) {
- this.modalName = null
- },
- }
- }
- </script>
- <style lang='scss' scoped>
- .title_b {
- margin: 20rpx 20rpx 0rpx 20rpx;
- padding: 20rpx 10rpx 20rpx 10rpx;
- font-size: 18px;
- font-weight: 550;
- }
- page {
- background: #F5F6FA;
- }
- .wrap {
- padding-bottom: 10px;
- font-size: 14px;
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- input {
- font-size: 14px;
- }
- >.title {
- padding: 10px 16px;
- }
- .b-b:after {
- border-bottom: 1px solid #eee;
- }
- }
- .footer {
- background: #fff;
- position: fixed;
- bottom: 0;
- width: 100%;
- padding: 20px 10px;
- z-index: 10;
- .button {
- background: #22C572;
- width: 90%;
- margin: 20rpx auto;
- padding: 10px;
- color: #fff;
- text-align: center;
- border-radius: 30px;
- }
- }
- .c-row {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- align-items: center;
- padding: 20rpx 30rpx;
- position: relative;
- }
- .con-list {
- -webkit-box-flex: 1;
- -webkit-flex: 1;
- flex: 1;
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- flex-direction: column;
- color: #303133;
- line-height: 40rpx;
- text-align: right;
- padding-right: 20rpx;
- }
- input:disabled {
- color: #ccc;
- }
- .textarea-style {
- border: 1px solid #EEEEEE;
- width: 100%;
- padding: 20rpx;
- border-radius: 20rpx;
- }
- .c-row-fj {
- padding: 20rpx
- }
- .buns_item {
- display: flex;
- padding: 80rpx 0 50rpx 0;
- justify-content: space-around;
- }
- .but_css {
- background: #22C572;
- width: 40%;
- padding: 20rpx;
- color: #fff;
- text-align: center;
- border-radius: 20rpx;
- }
- </style>
|