12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865 |
- // 创建出入库任务
- <template>
- <div class="container">
- <el-row>
- <el-col :span="12">
- <h2 class="bg-left title">创建出入库任务</h2>
- </el-col>
- <el-col :span="12" class="bg-right">
- <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
- <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png" alt />返回
- </el-button>
- </el-col>
- </el-row>
- <div class="basicInformation">
- <div class="annu">
- <el-radio-group @change="tasktypechange" v-model="dataList.taskTypeKey">
- <el-radio label="1" class="a">出库</el-radio>
- <el-radio label="2" class="a">入库</el-radio>
- <el-radio label="3" class="a">移库</el-radio>
- <el-radio label="4" class="a">退库并出库</el-radio>
- </el-radio-group>
- </div>
- <div class="ding"></div>
- <div v-if="dataList.taskTypeKey != 2 && dataList.taskTypeKey != 4" class="center1">
- <img style="position: relative; top: 40px; left: 300px" width="19" height="19"
- src="../../../public/img/cangku.png" alt />
- <!--出库=-->
- <div class="small-title">
- <h3>出库任务({{ inOutTaskNo }})</h3>
- </div>
- <el-form ref="dataList" :model="dataList" label-width="140px" input-width="300px">
- <!-- 仓库名 -->
- <el-form-item label="仓库名">
- <el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"
- @change="selectwarehouseName">
- <el-option v-for="item in warehouseNameList" :key="item.constKey"
- :label="item.warehouseName" :value="item.id" />
- </el-select>
- </el-form-item>
- <!-- 出库类型 -->
- <el-form-item label="出库类型">
- <el-select :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.inOutType" placeholder="请选择出库类型" class="typeselect"
- @change="selectstorageType">
- <el-option v-for="item in storageType" :key="item.constKey" v-if="
- (dataList.taskTypeKey == 1 &&
- item.constValue != '移库出库') ||
- (dataList.taskTypeKey == 3 &&
- item.constValue == '移库出库') ||
- (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
- " :label="item.constValue" :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!-- 合同编号 -->
- <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
- <el-select @change="changecontract" v-model="dataList.contractNo" placeholder="请输入合同编号"
- class="typeselect">
- <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
- <el-input @input="selectTaskNo" v-model="dataList.moveTaskNo" placeholder="请输入移库任务编号"
- class="typeselect">
- <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-input>
- </el-form-item>
- <!-- 货名 -->
- <el-form-item label="货名" class="huom">
- <el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
- class="huom" @change="selectgoodsName">
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue"></el-option>
- </el-select>
- </el-form-item>
- <!--重量(吨)-->
- <el-form-item label="重量(吨)">
- <el-input @input="weightchange1" v-model="dataList.weight" placeholder="请输入重量(吨)"
- maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!-- 品级 -->
- <el-form-item label="品级">
- <el-select :disabled='gradestatus' v-model="dataList.grade" placeholder class="typeselect"
- @change="selectpackingMethod">
- <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!--容重(克/升)>=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=" span="1">
- <el-input disabled @input="bulkDensitychange" v-model="dataList.bulkDensity" placeholder="请输入容重"
- maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!--水分(%)<=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
- <el-input disabled @input="waterContentchange" v-model="dataList.waterContent"
- placeholder="请输入水分占比" maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!--单价(元/吨)-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" v-show="Pricetype">
- <el-input disabled @input="unitPricechange" v-model="dataList.unitPrice" placeholder="请输入单价"
- maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!--预计出库日期-->
- <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
- <el-date-picker v-model="dataList.predictDate" type="date" placeholder="请选择预计出库日期"
- value-format="yyyy-MM-dd" />
- </el-form-item>
- <!--预估运费(元/吨)-->
- <el-form-item label="预估运费(元/吨)" span="1">
- <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
- maxlength="20" size="small" />
- </el-form-item>
- <!--经办人-->
- <el-form-item label="发货人">
- <el-select v-model="dataList.agent" placeholder="请选择发货人" filterable
- @change="selectstaff">
- <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
- </el-select>
- </el-form-item>
- <!--业务描述=-->
- <el-form-item v-if="dataList.taskTypeKey != 3" label="业务描述" span="20">
- <el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"
- maxlength="150" size="large" />
- </el-form-item>
- </el-form>
- </div>
- <div v-show="dataList.taskTypeKey != 1" class="center1">
- <img style="position: relative; top: 40px; left: 300px" width="19" height="19"
- src="../../../public/img/cangku.png" alt />
- <div class="small-title">
- <h3>入库任务({{ inOutTaskNo1 }} )</h3>
- </div>
- <el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
- <!-- 仓库名 -->
- <el-form-item label="仓库名">
- <el-select v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect"
- @change="selectwarehouseName1">
- <el-option v-for="item in warehouseNameList" :key="item.constKey"
- :label="item.warehouseName" :value="item.id" />
- </el-select>
- </el-form-item>
- <!-- 入库类型 -->
- <el-form-item label="入库类型">
- <el-select :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList1.inOutType" placeholder="请选择入库类型" class="typeselect"
- @change="selectstorageType1">
- <el-option v-for="item in storageType1" :key="item.constKey" v-if="
- (dataList1.taskTypeKey == 2 &&
- item.constValue != '移库入库') ||
- (dataList1.taskTypeKey == 3 &&
- item.constValue == '移库入库') ||
- (dataList1.taskTypeKey == 4 && item.constValue == '退库')
- " :label="item.constValue" :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!-- 合同编号 -->
- <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
- <el-select @change="changecontract1" v-model="dataList1.contractNo" placeholder="请输入合同编号"
- class="typeselect">
- <el-option v-for="item in contractNoList1" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
- <el-input disabled v-model="dataList1.moveTaskNo" placeholder="请输入移库任务编号" class="typeselect">
- <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-input>
- </el-form-item>
- <!-- 货名 -->
- <el-form-item label="货名" class="huom">
- <el-select :disabled="dataList.taskTypeKey != 3 || dataList.taskTypeKey == 3"
- v-model="dataList.goodsName" placeholder="货名" class="huom" @change="selectgoodsName1">
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue"></el-option>
- </el-select>
- </el-form-item>
- <!--重量(吨)-->
- <el-form-item label="重量(吨)">
- <el-input @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
- maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!-- 品级 -->
- <el-form-item label="品级">
- <el-select :disabled="dataList.taskTypeKey == 3" v-model="dataList1.grade" placeholder
- class="typeselect" @change="selectpackingMethod1">
- <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!--容重(克/升)>=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
- <el-input @input="bulkDensitychange" :disabled="dataList.taskTypeKey == 3"
- v-model="dataList1.bulkDensity" placeholder="请输入容重" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--水分(%)<=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
- <el-input @input="waterContentchange" :disabled="dataList.taskTypeKey == 3"
- v-model="dataList1.waterContent" placeholder="请输入水分占比" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--单价(元/吨)-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" >
- <el-input @input="unitPricechange" :disabled="dataList.taskTypeKey == 3"
- v-model="dataList1.unitPrice" placeholder="请输入单价" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--预计出库日期-->
- <el-form-item label="预计入库日期" span="1" prop="predictDate" class="deliverydate">
- <el-date-picker v-model="dataList1.predictDate" type="date" placeholder="请选择预计入库日期"
- value-format="yyyy-MM-dd" />
- </el-form-item>
- <!--预估运费(元/吨)-->
- <el-form-item label="预估运费(元/吨)" span="1" >
- <el-input v-model="dataList1.estimatedFreight" placeholder="请输入预估运费"
- maxlength="20" size="small" />
- </el-form-item>
- <!-- 经办人-->
- <el-form-item label="收货人">
- <el-select v-model="dataList1.agent" placeholder="请选择收货人" filterable :filter-method="dataFilter1"
- @change="selectstaff1">
- <el-option v-for="item in options1" :key="item.value" :label="item.staffName" :value="item.staffName" />
- </el-select>
- </el-form-item>
- <!--业务描述=-->
- <el-form-item v-if="dataList.taskTypeKey != 4" label="业务描述">
- <el-input v-model="dataList1.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"
- maxlength="150" size="large" />
- </el-form-item>
- </el-form>
- </div>
- <div v-if="dataList.taskTypeKey == 4" class="center1">
- <!--出库=-->
- <div class="small-title">
- <img style="position: relative; top: 40px; left: -22px" width="19" height="19"
- src="../../../public/img/cangku.png" alt />
- <h3>出库任务({{ inOutTaskNo }})</h3>
- </div>
- <el-form ref="dataList" :model="dataList" label-width="140px">
- <!-- 仓库名 -->
- <el-form-item label="仓库名">
- <el-select v-model="dataList.warehouseName" placeholder="请选择仓库名" class="typeselect"
- @change="selectwarehouseName">
- <el-option v-for="item in warehouseNameList" :key="item.constKey"
- :label="item.warehouseName" :value="item.id" />
- </el-select>
- </el-form-item>
- <!-- 出库类型 -->
- <el-form-item label="出库类型">
- <el-select :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.inOutType" placeholder="请选择出库类型" class="typeselect"
- @change="selectstorageType1">
- <el-option v-for="item in storageType" :key="item.constKey" v-if="
- (dataList.taskTypeKey == 1 &&
- item.constValue != '移库出库') ||
- (dataList.taskTypeKey == 3 &&
- item.constValue == '移库出库') ||
- (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
- " :label="item.constValue" :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!-- 合同编号 -->
- <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
- <el-select @change="changecontract" v-model="dataList.contractNo" placeholder="请输入合同编号"
- class="typeselect">
- <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
- <el-select @change="selectTaskNo" v-model="dataList.moveTaskNo" placeholder="请输入移库任务编号"
- class="typeselect">
- <el-option v-for="item in contractNoList" :key="item.constKey" :label="item.contractNo"
- :value="item.contractNo"></el-option>
- </el-select>
- </el-form-item>
- <!-- 货名 -->
- <el-form-item label="货名" class="huom">
- <el-select :disabled="dataList.taskTypeKey != 3" v-model="dataList.goodsName" placeholder="货名"
- class="huom" @change="selectgoodsName">
- <el-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue"></el-option>
- </el-select>
- </el-form-item>
- <!--重量(吨)-->
- <el-form-item label="重量(吨)">
- <el-input :disabled="dataList.taskTypeKey == 4" v-model="dataList.weight" placeholder="请输入重量(吨)"
- maxlength="120" size="small" class="huom" />
- </el-form-item>
- <!-- 品级 -->
- <el-form-item label="品级">
- <el-select :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.grade" placeholder class="typeselect" @change="selectpackingMethod">
- <el-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
- :value="item.constValue" />
- </el-select>
- </el-form-item>
- <!--容重(克/升)>=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
- <el-input :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.bulkDensity" placeholder="请输入容重" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--水分(%)<=-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=">
- <el-input :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.waterContent" placeholder="请输入水分占比" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--单价(元/吨)-->
- <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" v-show="Pricetype">
- <el-input :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
- v-model="dataList.unitPrice" placeholder="请输入单价" maxlength="120" size="small"
- class="huom" />
- </el-form-item>
- <!--预计出库日期-->
- <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
- <el-date-picker v-model="dataList.predictDate" type="date" placeholder="请选择预计出库日期"
- value-format="yyyy-MM-dd" />
- </el-form-item>
- <!--预估运费(元/吨)-->
- <el-form-item label="预估运费(元/吨)" span="1" >
- <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
- maxlength="20" size="small" />
- </el-form-item>
- <!--发货人-->
- <el-form-item label="发货人">
- <el-select v-model="dataList.agent" placeholder="请选择发货人" filterable
- @change="selectstaff">
- <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
- </el-select>
- </el-form-item>
- <!--业务描述=-->
- <el-form-item label="业务描述">
- <el-input v-model="dataList.businessDescribe" placeholder="请输入业务描述(运输方式),不超过150字"
- maxlength="150" size="large" />
- </el-form-item>
- </el-form>
- </div>
- </div>
- <!-- 提交 -->
- <div style="text-align: right; padding: 10px" class="center">
- <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
- </div>
- </div>
- </template>
- <script>
- import {
- getwarehousename,
- xialaNo,
- addoreditoutput,
- getGoodsName
- } from '@/model/tasksport/index'
- import {
- mapGetters
- } from 'vuex'
- import {
- pullDown,
- getstaff
- } from '@/model/warehouse/index'
- import Pagination from '@/components/Pagination'
- import WsUpload from '@/components/WsUpload'
- // import { dayjs, fmoney, EventBus } from 'base-core-lib'
- import {
- dayjs,
- EventBus
- } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination
- },
- watch: {
- // vesselId(val) {
- // this.getList()
- // },
- isShow(val) {
- this.showType = val
- },
- flag(val) {
- xialaNo({
- compId: this.compId,
- flag: val
- })
- .toPromise()
- .then(response => {
- if (
- this.dataList1.taskTypeKey == 2 ||
- this.dataList1.taskTypeKey == 4
- ) {
- this.contractNoList1 = response
- if (this.dataList1.taskTypeKey == 2) {
- this.contractNoList = response
- }
- } else {
- this.contractNoList = response
- }
- })
- }
- },
- computed: {
- ...mapGetters(['deptBudgetList'])
- },
- data() {
- return {
- gradestatus:true,
- flag: 1,
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- // 船舶类型
- monetaryKey: null,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- disabled: false,
- // 年
- year: '',
- contractNoList: [],
- contractNoList1: [],
- deptBudgetTotal: 0,
- readonly: true,
- currentPage: 1,
- pageSize: 10,
- searchType: 1,
- searchKeyWord: '',
- radio: '1',
- contractType: 2,
- startDate: null,
- endDate: null,
- goodnameList: [],
- checked: true,
- form: {},
- staffList: [],
- staffList1: [],
- options: [],
- options1: [],
- storageType: [],
- storageType1: [],
- outContractNo: [],
- // 提交类型
- submitType: true,
- status: [],
- warehouseNameList: [],
- warehouseNameList1: [],
- appendixIdsAdd: '',
- uploadSuccess: {},
- deletetask: false,
- warehouseInOutDetail: {},
- onChange: {},
- deptBudgetList1: [],
- gradeList: [],
- rules: {
- netWeight: [{
- required: true,
- type: 'number',
- message: '请输入活动名称',
- trigger: 'blur'
- }]
- },
- size: 10,
- compId: localStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- packtypeList: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM')
- },
- contractList: [],
- inOutTaskNo: '',
- inOutTaskNo1: '',
- dataList: {
- taskTypeKey: '1'
- },
- dataList1: {
- taskTypeKey: '1',
- inOutType: ''
- },
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: time => {
- return time.getTime() > Date.now()
- }
- },
- accessoryTFs: false,
- Pricetype:true,//价格类型为随行就市隐藏单价
- }
- },
- activated() {
- this.getList()
- },
- methods: {
- //返回按钮
- revert() {
- this.$router.go(-1)
- },
- returnsales() {
- this.$router.push({
- path: 'tranManagementWarehouseInOuttask'
- })
- },
- // 获取当前年月日
- getdate() {
- var date = new Date()
- var year = date.getFullYear() //获取完整的年份(4位)
- var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
- var datetime = date.getDate() //获取当前日(1-31)
- var hour = date.getHours()
- var minutes = date.getMinutes()
- var seconds = date.getSeconds()
- if (mouth < 10) {
- mouth = '0' + mouth
- }
- if (datetime < 10) {
- datetime = '0' + datetime
- }
- if (hour < 10) {
- hour = '0' + hour
- }
- if (minutes < 10) {
- minutes = '0' + minutes
- }
- if (seconds < 10) {
- seconds = '0' + seconds
- }
- return year + '' + mouth + datetime + hour + minutes + seconds
- },
- // 随机验证码
- verifyinit() {
- var arr = []
- for (var i = 48; i < 57; i++) {
- arr.push(String.fromCharCode(i))
- }
- arr.sort(function() {
- return Math.random() - 0.5
- })
- arr.length = 4
- return arr.join('')
- },
- MathRand() {
- var Num = ''
- for (var i = 0; i < 4; i++) {
- Num += Math.floor(Math.random() * 10)
- }
- return Num
- },
- selectTaskNo(e) {
- if (this.dataList.taskTypeKey == 3) {
- this.$set(this.dataList1, 'moveTaskNo', e)
- }
- },
- dataFilter(val) {
- // console.log(val,"名")
- this.deptBudgetList.staffList = val
- if (val) {
- //val存在
- this.options = this.staffList.filter(item => {
- if (
- !!~item.staffName.indexOf(val) ||
- !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options = this.staffList
- }
- },
- dataFilter1(val) {
- // console.log(val,"名")
- this.deptBudgetList.staffList1 = val
- if (val) {
- //val存在
- this.options = this.staffList1.filter(item => {
- if (
- !!~item.staffName.indexOf(val) ||
- !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
- ) {
- return true
- }
- })
- } else {
- //val为空时,还原数组
- this.options1 = this.staffList1
- }
- },
- weightchange(e) {
- if (this.dataList.taskTypeKey == 4) {
- this.$set(this.dataList, 'weight', e)
- }
- },
- weightchange1(e) {
- if (this.dataList.taskTypeKey == 3) {
- this.$set(this.dataList1, 'weight', e)
- }
- },
- bulkDensitychange(e) {
- if (this.dataList.taskTypeKey == 4) {
- this.$set(this.dataList, 'bulkDensity', e)
- } else if (this.dataList1.taskTypeKey == 3) {
- this.$set(this.dataList1, 'bulkDensity', e)
- }
- },
- waterContentchange(e) {
- if (this.dataList.taskTypeKey == 4) {
- this.$set(this.dataList, 'waterContent', e)
- } else if (this.dataList1.taskTypeKey == 3) {
- this.$set(this.dataList1, 'waterContent', e)
- }
- },
- unitPricechange(e) {
- if (this.dataList.taskTypeKey == 4) {
- this.$set(this.dataList, 'unitPrice', e)
- } else if (this.dataList1.taskTypeKey == 3) {
- this.$set(this.dataList1, 'unitPrice', e)
- }
- },
- changecontract(e) {
- if (this.dataList.taskTypeKey != 3) {
- for (let i = 0; i < this.contractNoList.length; i++) {
- if (this.contractNoList[i].contractNo == e) {
- if(this.contractNoList[i].priceType == "随行就市"){
- this.Pricetype = false
- }else{
- this.Pricetype = true
- }
- getGoodsName({
- contractId: this.contractNoList[i].id,
- contractNo: this.contractNoList[i].contractNo
- })
- .toPromise()
- .then(response => {
- this.$set(this.dataList, 'goodsName', response.goodsName)
- this.$set(this.dataList, 'goodsNameKey', response.goodsNameKey)
- this.$set(this.dataList, 'grade', response.grade)
- this.$set(this.dataList, 'gradeKey', response.gradeKey)
- this.$set(this.dataList, 'waterContent', response.waterContent)
- this.$set(this.dataList, 'bulkDensity', response.bulkDensity)
- // this.$set(this.dataList, 'weight', response.weight)
- this.$set(
- this.dataList,
- 'unitPrice',
- response.unitContractPrice
- )
- })
- }
- }
- }
- },
- selectwarehouseName(e) {
- for (var i = 0; i < this.warehouseNameList.length; i++) {
- if (this.warehouseNameList[i].id == e) {
- this.dataList.warehouseName = this.warehouseNameList[i].warehouseName
- if(this.dataList.taskTypeKey==3||this.dataList1.taskTypeKey==3){
- if(this.warehouseNameList[i].warehouseType==2){
- this.$set(this.dataList, 'goodsName', this.warehouseNameList[i].goodsName)
- this.$set(this.dataList, 'grade', this.warehouseNameList[i].grade)
- this.$set(this.dataList1, 'goodsName', this.warehouseNameList[i].goodsName)
- this.$set(this.dataList1, 'grade', this.warehouseNameList[i].grade)
- this.gradestatus=true
- }else{
- this.gradestatus=false
- }
- }
-
- console.log(this.warehouseNameList[i])
- //经办人
- getstaff({
- compId: localStorage.getItem('ws-pf_compId'),
- warehouseId: e
- })
- .toPromise()
- .then(response => {
- this.options = response
- this.staffList = response
- // this.agent = response
- })
- }
- }
- },
- selectwarehouseName1(e) {
- for (var i = 0; i < this.warehouseNameList.length; i++) {
- if (this.warehouseNameList[i].id == e) {
- this.dataList1.warehouseName = this.warehouseNameList[i].warehouseName
- //经办人
- getstaff({
- compId: localStorage.getItem('ws-pf_compId'),
- warehouseId: e
- })
- .toPromise()
- .then(response => {
- this.options1 = response
- this.staffList1 = response
- // this.agent = response
- })
- }
- }
- },
- changecontract1(e) {
- if (this.dataList1.taskTypeKey != 3) {
- for (let i = 0; i < this.contractNoList.length; i++) {
- if (this.contractNoList[i].contractNo == e) {
- getGoodsName({
- contractId: this.contractNoList[i].id,
- contractNo: this.contractNoList[i].contractNo
- })
- .toPromise()
- .then(response => {
- this.$set(this.dataList1, 'goodsName', response.goodsName)
- this.$set(this.dataList1, 'goodsNameKey', response.goodsNameKey)
- this.$set(this.dataList1, 'grade', response.grade)
- this.$set(this.dataList1, 'gradeKey', response.gradeKey)
- this.$set(this.dataList1, 'waterContent', response.waterContent)
- this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
- this.$set(this.dataList1, 'weight', response.weight)
- this.$set(
- this.dataList1,
- 'unitPrice',
- response.unitContractPrice
- )
- })
- }
- }
- }
- },
- selectstaff(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.dataList.agentKey = this.staffList[i].staffId
- }
- }
- },
- selectstaff1(e) {
- for (var i = 0; i < this.staffList.length; i++) {
- if (this.staffList[i].staffName == e) {
- this.dataList1.agentKey = this.staffList[i].staffId
- }
- }
- },
- requestadd(list, status) {
- list.compId = localStorage.getItem('ws-pf_compId')
- list.publisher =
- localStorage.getItem('ws-pf_roleName') +
- localStorage.getItem('ws-pf_staffName')
- addoreditoutput(list)
- .toPromise()
- .then(response => {
- var that = this
- this.$message.success('添加成功')
- setTimeout(function() {
- that.dataList = {
- taskTypeKey: 1
- }
- that.dataList1 = {}
- that.$router.push({
- path: 'tranManagementWarehouseInOuttask'
- })
- }, 2000)
- })
- },
- //提交按钮
- submit() {
- if (this.dataList.taskTypeKey == 1) {
- if (!this.dataList.warehouseName) {
- this.$message({
- message: '仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.contractNo) {
- this.$message({
- message: '合同编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.weight) {
- this.$message({
- message: '重量(吨)不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- isNaN(this.dataList.weight) ||
- (String(this.dataList.weight).indexOf('.') != -1 &&
- String(this.dataList.weight).length -
- (String(this.dataList.weight).indexOf('.') + 1) >
- 2) ||
- this.dataList.weight < 0 ||
- this.dataList.weight > 200000
- ) {
- this.$message({
- message: '重量(吨)输入有误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.bulkDensity) {
- this.$message({
- message: '容重不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList.bulkDensity < 0 ||
- this.dataList.bulkDensity > 1000
- ) {
- this.$message({
- message: '容重输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList.bulkDensity).indexOf('.') != -1 &&
- String(this.dataList.bulkDensity).length -
- (String(this.dataList.bulkDensity).indexOf('.') + 1) >
- 0
- ) {
- this.$message({
- message: '容重需输入整数',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.waterContent) {
- this.$message({
- message: '水分不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.dataList.waterContent < 0 || this.dataList.waterContent > 40) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList.waterContent).indexOf('.') != -1 &&
- String(this.dataList.waterContent).length -
- (String(this.dataList.waterContent).indexOf('.') + 1) >
- 1
- ) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if(this.Pricetype){
- if (!this.dataList.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- (this.dataList.unitPrice &&
- String(this.dataList.unitPrice).indexOf('.') != -1 &&
- String(this.dataList.unitPrice).length -
- (String(this.dataList.unitPrice).indexOf('.') + 1) >
- 2) ||
- this.dataList.unitPrice > 100000 ||
- this.dataList.unitPrice < 1
- ) {
- this.$message({
- message: '单价输入错误',
- type: 'warning'
- })
- return
- }
- }
-
-
- if (!this.dataList.predictDate) {
- this.$message({
- message: '预计出库日期不能为空!',
- type: 'warning'
- })
- return
- }
- if (isNaN(this.dataList.estimatedFreight)) {
- this.$message({
- message: '预估运费输入错误!',
- type: 'warning'
- })
- return
- }
- // if (!this.dataList.agent) {
- // this.$message({
- // message: '出库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- if (!this.dataList.businessDescribe) {
- this.$message({
- message: '业务描述不能为空!',
- type: 'warning'
- })
- return
- }
- }
- if (this.dataList.taskTypeKey == 2) {
- if (!this.dataList1.warehouseName) {
- this.$message({
- message: '仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.contractNo) {
- this.$message({
- message: '合同编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.weight) {
- this.$message({
- message: '重量(吨)不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- isNaN(this.dataList1.weight) ||
- (String(this.dataList1.weight).indexOf('.') != -1 &&
- String(this.dataList1.weight).length -
- (String(this.dataList1.weight).indexOf('.') + 1) >
- 2) ||
- this.dataList1.weight < 0 ||
- this.dataList1.weight > 200000
- ) {
- this.$message({
- message: '重量(吨)输入有误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.bulkDensity) {
- this.$message({
- message: '容重不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList1.bulkDensity < 500 ||
- this.dataList1.bulkDensity > 1000
- ) {
- this.$message({
- message: '容重输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
- String(this.dataList1.bulkDensity).length -
- (String(this.dataList1.bulkDensity).indexOf('.') + 1) >
- 0
- ) {
- this.$message({
- message: '容重需输入整数',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.waterContent) {
- this.$message({
- message: '水分不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList1.waterContent < 0 ||
- this.dataList1.waterContent > 40
- ) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList1.waterContent).indexOf('.') != -1 &&
- String(this.dataList1.waterContent).length -
- (String(this.dataList1.waterContent).indexOf('.') + 1) >
- 1
- ) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if(this.Pricetype){
- if (!this.dataList1.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- (this.dataList1.unitPrice &&
- String(this.dataList1.unitPrice).indexOf('.') != -1 &&
- String(this.dataList1.unitPrice).length -
- (String(this.dataList1.unitPrice).indexOf('.') + 1) >
- 2) ||
- this.dataList1.unitPrice > 100000 ||
- this.dataList1.unitPrice < 1
- ) {
- this.$message({
- message: '单价输入错误',
- type: 'warning'
- })
- return
- }
- }
-
- if (!this.dataList1.predictDate) {
- this.$message({
- message: '预计入库日期不能为空!',
- type: 'warning'
- })
- return
- }
- if (isNaN(this.dataList1.estimatedFreight)) {
- this.$message({
- message: '预估运费输入错误!',
- type: 'warning'
- })
- return
- }
- // if (!this.dataList1.agent) {
- // this.$message({
- // message: '入库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- if (!this.dataList1.businessDescribe) {
- this.$message({
- message: '业务描述不能为空!',
- type: 'warning'
- })
- return
- }
- }
- if (this.dataList.taskTypeKey == 3) {
- if (!this.dataList.warehouseName) {
- this.$message({
- message: '出库仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.warehouseName) {
- this.$message({
- message: '入库仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.moveTaskNo) {
- this.$message({
- message: '移库任务编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.weight) {
- this.$message({
- message: '重量(吨)不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- isNaN(this.dataList1.weight) ||
- (String(this.dataList1.weight).indexOf('.') != -1 &&
- String(this.dataList1.weight).length -
- (String(this.dataList1.weight).indexOf('.') + 1) >
- 2) ||
- this.dataList1.weight < 0 ||
- this.dataList1.weight > 200000
- ) {
- this.$message({
- message: '重量(吨)输入有误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.predictDate) {
- this.$message({
- message: '预计出库日期不能为空!',
- type: 'warning'
- })
- return
- }
- if (isNaN(this.dataList1.estimatedFreight)) {
- this.$message({
- message: '预估运费输入错误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.predictDate) {
- this.$message({
- message: '预计入库日期不能为空!',
- type: 'warning'
- })
- return
- }
- // if (!this.dataList.agent) {
- // this.$message({
- // message: '出库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- // if (!this.dataList1.agent) {
- // this.$message({
- // message: '入库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- if (!this.dataList1.businessDescribe) {
- this.$message({
- message: '业务描述不能为空!',
- type: 'warning'
- })
- return
- }
- }
- if (this.dataList1.taskTypeKey == 4) {
- if (!this.dataList.warehouseName) {
- this.$message({
- message: '出库仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.warehouseName) {
- this.$message({
- message: '入库仓库名不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.contractNo) {
- this.$message({
- message: '合同编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList.contractNo) {
- this.$message({
- message: '合同编号不能为空!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.weight) {
- this.$message({
- message: '重量(吨)不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- isNaN(this.dataList1.weight) ||
- (String(this.dataList1.weight).indexOf('.') != -1 &&
- String(this.dataList1.weight).length -
- (String(this.dataList1.weight).indexOf('.') + 1) >
- 2) ||
- this.dataList1.weight < 0 ||
- this.dataList1.weight > 200000
- ) {
- this.$message({
- message: '重量(吨)输入有误!',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.bulkDensity) {
- this.$message({
- message: '容重不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList1.bulkDensity < 500 ||
- this.dataList1.bulkDensity > 1000
- ) {
- this.$message({
- message: '容重输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
- String(this.dataList1.bulkDensity).length -
- (String(this.dataList1.bulkDensity).indexOf('.') + 1) >
- 0
- ) {
- this.$message({
- message: '容重需输入整数',
- type: 'warning'
- })
- return
- }
- if (!this.dataList1.waterContent) {
- this.$message({
- message: '水分不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- this.dataList1.waterContent < 0 ||
- this.dataList1.waterContent > 40
- ) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if (
- String(this.dataList1.waterContent).indexOf('.') != -1 &&
- String(this.dataList1.waterContent).length -
- (String(this.dataList1.waterContent).indexOf('.') + 1) >
- 1
- ) {
- this.$message({
- message: '水分输入错误',
- type: 'warning'
- })
- return
- }
- if(this.Pricetype){
- if (!this.dataList1.unitPrice) {
- this.$message({
- message: '单价不能为空!',
- type: 'warning'
- })
- return
- }
- if (
- (this.dataList1.unitPrice &&
- String(this.dataList1.unitPrice).indexOf('.') != -1 &&
- String(this.dataList1.unitPrice).length -
- (String(this.dataList1.unitPrice).indexOf('.') + 1) >
- 2) ||
- this.dataList1.unitPrice > 100000 ||
- this.dataList1.unitPrice < 1
- ) {
- this.$message({
- message: '单价输入错误',
- type: 'warning'
- })
- return
- }
- }
-
- if (!this.dataList.predictDate) {
- this.$message({
- message: '预计出库日期不能为空!',
- type: 'warning'
- })
- return
- }
-
- if (!this.dataList1.predictDate) {
- this.$message({
- message: '预计入库日期不能为空!',
- type: 'warning'
- })
- return
- }
- if (isNaN(this.dataList1.estimatedFreight)) {
- this.$message({
- message: '预估运费输入错误!',
- type: 'warning'
- })
- return
- }
- // if (!this.dataList.agent) {
- // this.$message({
- // message: '出库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- // if (!this.dataList1.agent) {
- // this.$message({
- // message: '入库经办人不能为空!',
- // type: 'warning'
- // })
- // return
- // }
- if (!this.dataList.businessDescribe) {
- this.$message({
- message: '业务描述不能为空!',
- type: 'warning'
- })
- return
- }
- }
- // this.dataList.goodsNameKey =
- // this.dataList.positionId =
- // this.dataList.baseId =
- this.dataList.inOutFlag = 1
- this.dataList1.inOutFlag = 2
- if (this.dataList.taskTypeKey == 1) {
- this.dataList.inOutTaskNo = this.inOutTaskNo
- this.requestadd(this.dataList)
- } else if (this.dataList1.taskTypeKey == 2) {
- this.dataList1.inOutTaskNo = this.inOutTaskNo1
- this.requestadd(this.dataList1)
- } else if (
- this.dataList.taskTypeKey == 3 ||
- this.dataList.taskTypeKey == 4
- ) {
- this.dataList.inOutTaskNo = this.inOutTaskNo
- this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
- if (this.dataList.taskTypeKey == 3) {
- this.dataList.businessDescribe = this.dataList1.businessDescribe
- } else {
- this.dataList1.businessDescribe = this.dataList.businessDescribe
- }
- this.requestadd(this.dataList, 'repetition')
- this.dataList1.inOutTaskNo = this.inOutTaskNo1
- this.dataList1.relevanceId = this.dataList.relevanceId
- this.dataList1.goodsName = this.dataList.goodsName
- this.requestadd(this.dataList1, 'repetition')
- }
- },
- tarechange(e) {
- if (this.dataList.grossWeight && this.dataList.tare) {
- this.dataList.netWeight = Number(
- this.dataList.grossWeight - this.dataList.tare
- )
- }
- },
- grossWeightchange(e) {
- if (this.dataList.grossWeight && this.dataList.tare) {
- this.dataList.netWeight = Number(
- this.dataList.grossWeight - this.dataList.tare
- )
- }
- },
- selectgoodsName(e) {
- for (var i = 0; i < this.goodnameList.length; i++) {
- if (this.goodnameList[i].constValue == e) {
- this.dataList.goodsNameKey = this.goodnameList[i].constKey
- }
- }
- },
- selectgoodsName1(e) {
- for (var i = 0; i < this.goodnameList.length; i++) {
- if (this.goodnameList[i].constValue == e) {
- this.dataList1.goodsNameKey = this.goodnameList[i].constKey
- }
- }
- },
- selectpackingMethod(e) {
- for (var i = 0; i < this.gradeList.length; i++) {
- if (this.gradeList[i].constValue == e) {
- this.dataList.gradeKey = this.gradeList[i].constKey
- if (this.dataList.taskTypeKey == 3) {
- this.$set(this.dataList1, 'grade', e)
- this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
- }
- }
- }
- },
- selectpackingMethod1(e) {
- for (var i = 0; i < this.gradeList.length; i++) {
- if (this.gradeList[i].constValue == e) {
- this.dataList1.packingMethodKey = this.gradeList[i].constKey
- if (this.dataList1.taskTypeKey == 4) {
- this.$set(this.dataList, 'grade', e)
- this.$set(this.dataList, 'gradeKey', this.gradeList[i].constKey)
- }
- }
- }
- },
- selectstorageType(e) {
- switch (e) {
- case '采购出库':
- this.flag = 0
- break
- case '销售出库':
- this.flag = 1
- break
- }
- for (var i = 0; i < this.storageType.length; i++) {
- if (this.storageType[i].constValue == e) {
- this.dataList.inOutTypeKey = this.storageType[i].constKey
- }
- }
- },
- selectstorageType1(e) {
- switch (e) {
- case '采购入库':
- this.flag = 0
- break
- case '暂存入库':
- this.flag = 0
- break
- case '贸易服务入库':
- this.flag = 0
- break
- case '退库':
- this.flag = 2
- break
- }
- for (var i = 0; i < this.storageType1.length; i++) {
- if (this.storageType1[i].constValue == e) {
- this.dataList1.inOutTypeKey = this.storageType1[i].constKey
- }
- }
- },
- handleClose() {
- this.accessoryTFs = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- businessDescriptionchange(e) {
- console.log(e)
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- tasknumber() {
- if (this.dataList.taskTypeKey == 1) {
- this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
- } else if (this.dataList.taskTypeKey == 2) {
- this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
- } else if (this.dataList.taskTypeKey == 3) {
- var random = this.getdate() + this.MathRand()
- this.inOutTaskNo = 'YKC' + random
- this.inOutTaskNo1 = 'YKR' + random
- // this.dataList.moveTaskNo = 'YKRW' + random
- // this.dataList1.moveTaskNo = 'YKRW' + random
- } else if (this.dataList.taskTypeKey == 4) {
- var random = this.getdate() + this.MathRand()
- this.inOutTaskNo = 'TCC' + random
- this.inOutTaskNo1 = 'TCR' + random
- }
- },
- tasktypechange(e) {
- if (!this.$route.query.relevanceId) {
- this.tasknumber()
- }
- this.dataList1.taskTypeKey = e
- if (this.dataList.taskTypeKey == 1) {
- this.dataList.inOutType = '销售出库'
- this.dataList.inOutTypeKey = '1'
- this.flag = 1
- }
- if (this.dataList1.taskTypeKey == 2) {
- this.dataList1.inOutType = '采购入库'
- this.dataList1.inOutTypeKey = '1'
- this.flag = 0
- } else if (this.dataList1.taskTypeKey == 3) {
- this.disabled = true
- this.dataList1.inOutType = '移库入库'
- this.dataList1.inOutTypeKey = '3'
- this.dataList.inOutType = '移库出库'
- this.dataList.inOutTypeKey = '3'
- } else if (this.dataList1.taskTypeKey == 4) {
- this.disabled = true
- this.dataList1.inOutType = '退库'
- this.dataList1.inOutTypeKey = '6'
- this.dataList.inOutType = '销售出库'
- this.flag = 2
- this.dataList.inOutTypeKey = '1'
- }
- },
- GetRandomNum(Min, Max) {
- var Range = Max - Min
- var Rand = Math.random()
- return Min + Math.round(Rand * Range)
- },
- getList() {
- this.tasknumber()
- this.$set(this.dataList, 'inOutType', '销售出库')
- this.$set(this.dataList, 'inOutTypeKey', '1')
- this.$set(this.dataList, 'goodsName', '玉米')
- this.$set(this.dataList, 'goodsNameKey', '1')
- this.$set(this.dataList, 'grade', '一等品')
- this.$set(this.dataList, 'gradeKey', '1')
- this.$set(this.dataList1, 'goodsName', '玉米')
- this.$set(this.dataList1, 'goodsNameKey', '1')
- this.$set(this.dataList1, 'grade', '一等品')
- this.$set(this.dataList1, 'gradeKey', '1')
- // 货名
- pullDown({
- constId: 'CON2'
- })
- .toPromise()
- .then(response => {
- this.goodnameList = response
- })
- // 品级
- pullDown({
- constId: 'CON3'
- })
- .toPromise()
- .then(response => {
- this.gradeList = response
- })
- pullDown({
- constId: 'CON6'
- })
- .toPromise()
- .then(response => {
- this.storageType = response
- })
- pullDown({
- constId: 'CON5'
- })
- .toPromise()
- .then(response => {
- this.storageType1 = response
- })
- xialaNo({
- compId: this.compId,
- flag: this.flag
- })
- .toPromise()
- .then(response => {
- this.contractNoList = response
- // this.contractNoList1 = response
- })
- // //临时仓库入库类型
- // pullDown({ constId: 'WARE1' })
- // .toPromise()
- // .then((response) => {
- // this.storageType = respons
- // })
- // //临时仓库出库类型
- // pullDown({ constId: 'WARE2' })
- // .toPromise()
- // .then((response) => {
- // this.deliveryType = response
- // })
- //仓库名
- getwarehousename({
- compId: this.compId,
- warehouseType: 1
- })
- .toPromise()
- .then(response => {
- this.warehouseNameList = response
- getwarehousename({
- compId: this.compId,
- warehouseType: 2
- })
- .toPromise()
- .then(response => {
- console.log("查仓库sss",response)
- for (var i = 0; i < response.length; i++) {
- this.warehouseNameList.push(response[i])
- }
- })
- })
- },
- selecttaskType(e) {
- for (var i = 0; i < this.taskTypeList.length; i++) {
- if (this.taskTypeList[i].value == e) {
- this.searchType = this.taskTypeList[i].type
- }
- }
- },
- fujian(row) {
- if (
- row.receiveAttachmentPath === null ||
- row.receiveAttachmentPath === ''
- ) {
- EventBus.$emit(
- 'warning',
- this.$t('system.noticeCircular.NoInformation')
- )
- } else {
- this.accessoryTFs = true
- }
- this.appendixIdss = row.receiveAttachmentPath
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: {
- id: row.id
- }
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- console.log(row)
- billoperatehis({
- id: row.id
- })
- .toPromise()
- .then(response => {
- this.historyList = response
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- /deep/.basicInformation {
- .el-info-table {
- border: none;
- position: relative;
- }
- .el-form-item {
- width: 33.3333%;
- border: none;
- margin: 0;
- .el-form-item__label {
- text-align: left;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- }
- .el-form-item__content {
- padding-left: 0px;
- padding-right: 10px;
- // background: #fff;
- white-space: nowrap;
- height: 40px;
- display: flex;
- -webkit-box-align: center;
- align-items: center;
- text-align: left;
- overflow: hidden;
- }
- }
- }
- /deep/.el-radio {
- color: #606266;
- font-weight: 500;
- line-height: 1;
- cursor: pointer;
- white-space: nowrap;
- outline: 0;
- margin-right: 30px;
- margin-top: 15px;
- }
- /deep/.el-radio__inner {
- border: 1px solid #dcdfe6;
- border-radius: 100%;
- width: 14px;
- height: 14px;
- background-color: #fff;
- cursor: pointer;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- margin-left: 100px;
- }
- /deep/.el-radio__input {
- white-space: nowrap;
- cursor: pointer;
- outline: 0;
- line-height: 1;
- vertical-align: middle;
- margin-top: -1px;
- }
- .title {
- position: relative;
- padding-left: 10px;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .el-form {
- padding: 0 15%;
- display: flex;
- flex-wrap: wrap;
- margin-left: -50px;
- margin-top: 15px;
- width: 110%;
- }
- .el-button--primary {
- background-color: #5878e8;
- border-color: #5878e8;
- }
- .el-col {
- background: #f6f7fc;
- }
- .bg-right {
- text-align: right;
- padding: 16px 20px;
- }
- .center {
- position: relative;
- top: 50px;
- width: 40%;
- margin: 0 auto;
- margin-right: 180px;
- }
- /deep/.el-form-item__label {
- width: 160px;
- }
- .inspector {
- width: 50%;
- }
- /deep/.el-form-item--small .el-form-item__label,
- .el-form-item--small .el-form-item__content {
- text-align: left;
- }
- /deep/.el-input--small {
- font-size: 13px;
- position: relative;
- display: inline-block;
- }
- .center1 .small-title {
- margin-left: 323px;
- }
- .center1 {
- width: 90%;
- margin: 0 auto;
- margin-left: 10px;
- margin-top: 25px;
- }
- /deep/.el-input--small .el-input__inner {
- height: 32px;
- line-height: 32px;
- }
- /deep/.el-select {
- display: inline-block;
- position: relative;
- width: 100%;
- }
- .annu {
- height: 81px;
- background: #ffffff;
- border-radius: 4px;
- }
- .basicInformation .el-form-item {
- width: 50.3333%;
- border: none;
- margin: 0;
- }
- .huom {
- width: 100%;
- }
- .el-form {
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #8890b1;
- line-height: 16px;
- }
- .a {
- margin-left: -32px;
- }
- .el-radio-group {
- margin-left: 251px;
- }
- .ding {
- height: 23px;
- background: #e8ecf6;
- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
- }
- .winseaview-view {
- padding: 0 0 20px;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- .el-radio-group {
- font-size: 0;
- margin-top: 20px;
- }
- /deep/.el-form {
- padding: 0 15%;
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap;
- margin-left: 130px;
- margin-top: 15px;
- width: 110%;
- }
- </style>
|