12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225 |
- <template>
- <div id="addOder">
- <el-card style="position: relative">
- <span>基本信息</span>
- <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
- <el-row :gutter="10">
- <el-col :span="1.5">
- <el-form-item label="调出库存组织">
- <el-select clearable :disabled="sonDisable" size="mini" v-model="basicForm.deliveryInventoryOrg"
- @clear="clean('调出库存组织')"
- @change="controlCk('调出库存组织')"
- @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')"
- style="width: 200px"
- >
- <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调入库存组织">
- <el-select clearable :disabled="sonDisable" size="mini" v-model="basicForm.storageInventoryOrg"
- @clear="clean('调入库存组织')"
- @change="controlCk('调入库存组织')"
- @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')"
- style="width: 200px"
- >
- <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调出部门">
- <el-select clearable :disabled="sonDisable || isOrg"
- size="mini"
- v-model="basicForm.deliveryDept"
- @focus="chooseRefer('DEPT_PARAM', true, '调出部门', basicForm.deliveryInventoryOrg)"
- style="width: 200px"
- >
- <el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调出仓库">
- <el-select clearable :disabled="sonDisable || isOrg"
- size="mini"
- v-model="basicForm.deliveryWarehouse"
- @clear="clean('调出仓库')"
- @change="controlDCHW"
- @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg, 'N', 'N')"
- style="width: 200px"
- >
- <el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="1.5">
- <el-form-item label="调出业务员">
- <el-select clearable :disabled="sonDisable"
- size="mini"
- v-model="basicForm.businessPersonal"
- @clear="clean('调出业务员')"
- @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')"
- style="width: 200px"
- >
- <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调入仓库">
- <el-select clearable :disabled="sonDisable || isOrg"
- size="mini"
- v-model="basicForm.storageWarehouse"
- @clear="clean('调入仓库')"
- @change="controlDRHW"
- @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')"
- style="width: 200px"
- >
- <el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="订单类型">
- <el-select clearable v-model="basicForm.billType" :disabled="sonDisable" size="mini" style="width: 200px">
- <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调拨方式">
- <el-select clearable disabled v-model="basicForm.allotType" size="mini" style="width: 200px">
- <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="单据号">
- <el-input clearable :disabled="sonDisable" v-model="basicForm.code" size="mini" style="width: 200px"/>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="单据日期">
- <el-date-picker clearable :disabled="sonDisable" v-model="basicForm.billDate" size="mini" type="date"
- @change="changeBillDate"
- value-format="yyyy-MM-dd"
- style="width: 200px"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调拨出库单号">
- <el-input
- v-model="basicForm.deliveryCode"
- size="mini"
- :disabled="sonDisable"
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="调拨入库单号">
- <el-input
- v-model="basicForm.storageCode"
- size="mini"
- :disabled="sonDisable"
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="币种">
- <el-select clearable :disabled="sonDisable"
- size="mini"
- v-model="basicForm.currency"
- @focus="chooseRefer('CURRENCY_PARAM', true, '币种')"
- style="width: 200px"
- >
- <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="总数量">
- <el-input disabled v-model="basicForm.qty" type="number" min="0" size="mini" style="width: 200px"/>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="结算路径">
- <el-input clearable :disabled="sonDisable" v-model="basicForm.accountPath" size="mini" style="width: 200px"/>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="折本汇率">
- <el-input-number
- v-model="basicForm.rate" size="mini" disabled :precision="2" :step="0.1" :max="10" style="width: 200px"></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="客户">
- <el-select clearable :disabled="sonDisable"
- size="mini"
- v-model="basicForm.customer"
- @clear="clean('客户')"
- @focus="chooseRefer('CUSTOMER_PARAM', true, '客户')"
- style="width: 200px"
- >
- <!-- @change="controlDRHW" -->
- <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="1.5">
- <el-form-item label="物流项目组">
- <el-select clearable :disabled="sonDisable" v-model="basicForm.materialProject"
- size="mini"
- style="width: 200px"
- >
- <el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="利润中心">
- <el-select clearable :disabled="sonDisable"
- size="mini"
- v-model="basicForm.liacenter"
- @clear="clean('利润中心')"
- @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')"
- style="width: 200px"
- >
- <el-option v-for="item in liacenterOptions" :key="item.id" :label="item.name" :value="item.id"/>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="在途归属">
- <el-input clearable disabled v-model="basicForm.onRouteAffilliation" size="mini" style="width: 200px"/>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="单据状态">
- <el-select disabled v-model="basicForm.status"
- size="mini"
- style="width: 200px"
- >
- <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="备注">
- <el-input
- v-model="basicForm.remark"
- size="mini"
- :disabled="sonDisable"
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="1.5">
- <el-form-item label="NC单据号">
- <el-input
- v-model="basicForm.ncCode"
- size="mini"
- disabled
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="20">
- <el-form-item label="同步NC结果">
- <el-input
- v-model="basicForm.isSendWms"
- type="textarea"
- :rows="3"
- size="mini"
- disabled
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-tabs style="margin-top: 10px" type="border-card">
- <el-tab-pane label="物料信息">
- <div class="btn_grooup">
- <el-button type="primary" size="mini" v-if="!sonDisable" @click="addLine">增行</el-button>
- </div>
-
- <el-table
- v-loading="loading"
- :data="materialInfo"
- fit
- border
- max-height="280"
- style="font-size: 12px"
- :row-class-name="rowClassName"
- >
- <el-table-column
- show-overflow-tooltip
- label="行号"
- align="center"
- prop="rowno"
- >
- <template slot-scope="scope">
- {{ scope.row.rowno = scope.$index + 1 + "0" }}
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="采购需求单单号"
- align="center"
- prop="demandCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="物料编码"
- align="center"
- prop="materialCode"
- width="200px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- clearable
- :disabled="sonDisable"
- size="mini"
- v-model="scope.row.materialCode"
- @clear="cleanMx(scope.$index, '物料编码')"
- @focus="chooseMaterial(scope.$index)"
- >
- <el-button
- size="mini"
- :disabled="sonDisable"
- slot="append"
- icon="el-icon-more"
- @click="chooseMaterial(scope.$index)"
- ></el-button>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="物料名称"
- align="center"
- prop="materialName"
- width="180px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨出库单号"
- align="center"
- prop="deliveryCode"
- width="180px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨入库单号"
- align="center"
- prop="storageCode"
- width="180px"
- />
- <el-table-column
- show-overflow-tooltip
- label="规格"
- align="center"
- prop="specification"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产厂家/代理人"
- align="center"
- prop="manufacturer"
- width="250px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产地"
- align="center"
- prop="originPlaceName"
- />
- <el-table-column
- show-overflow-tooltip
- label="型号"
- align="center"
- prop="model"
- />
- <el-table-column
- show-overflow-tooltip
- label="单位"
- align="center"
- prop="unitName"
- />
- <!-- <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
- <el-table-column
- show-overflow-tooltip
- label="数量"
- align="center"
- prop="qty"
- width="150px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- type="number"
- min="0"
- :disabled="sonDisable"
- clearable
- size="mini"
- v-model="scope.row.qty"
- @input="getSL(scope)"
- />
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="主单位"
- align="center"
- prop="mainUnitName"
- />
- <el-table-column
- show-overflow-tooltip
- label="换算率"
- align="center"
- prop="equation"
- />
- <el-table-column
- show-overflow-tooltip
- label="主数量"
- align="center"
- prop="mainQty"
- width="150px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- type="number"
- min="0"
- :disabled="sonDisable"
- clearable
- size="mini"
- v-model="scope.row.mainQty"
- @input="getZSL(scope)"
- />
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="税率"
- align="center"
- prop="rate"
- />
- <el-table-column
- show-overflow-tooltip
- label="调出货位"
- align="center"
- prop="deliveryAllocationName"
- width="220px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- clearable
- :disabled="sonDisable || isDCCk"
- size="mini"
- v-model="scope.row.deliveryAllocationName"
- @clear="cleanMx(scope.$index, '调出货位')"
- @focus="
- chooseMxHW(
- scope.$index,
- 'ALLOCATION_PARAM',
- true,
- '调出货位',
- basicForm.deliveryWarehouse
- )
- "
- >
- <el-button
- size="mini"
- :disabled="sonDisable || isDCCk"
- slot="append"
- icon="el-icon-more"
- @click="
- chooseMxHW(
- scope.$index,
- 'ALLOCATION_PARAM',
- true,
- '调出货位',
- basicForm.deliveryWarehouse
- )
- "
- ></el-button>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="调入部门"
- align="center"
- prop="storageDeptName"
- width="220px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- clearable
- :disabled="sonDisable || isOrg"
- size="mini"
- v-model="scope.row.storageDeptName"
- @clear="cleanMx(scope.$index, '调入部门')"
- @focus="
- chooseMxBM(
- scope.$index,
- 'DEPT_PARAM',
- true,
- '调入部门',
- basicForm.storageInventoryOrg
- )
- "
- >
- <el-button
- size="mini"
- :disabled="sonDisable || isOrg"
- slot="append"
- icon="el-icon-more"
- @click="
- chooseMxBM(
- scope.$index,
- 'DEPT_PARAM',
- true,
- '调入部门',
- basicForm.storageInventoryOrg
- )
- "
- ></el-button>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="调入货位"
- align="center"
- prop="storageAllocationName"
- width="220px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- clearable
- :disabled="sonDisable || isDRCk"
- size="mini"
- v-model="scope.row.storageAllocationName"
- @clear="cleanMx(scope.$index, '调入货位')"
- @focus="
- chooseMxHW(
- scope.$index,
- 'ALLOCATION_PARAM',
- true,
- '调入货位',
- basicForm.storageWarehouse
- )
- "
- >
- <el-button
- size="mini"
- :disabled="sonDisable || isDRCk"
- slot="append"
- icon="el-icon-more"
- @click="
- chooseMxHW(
- scope.$index,
- 'ALLOCATION_PARAM',
- true,
- '调入货位',
- basicForm.storageWarehouse
- )
- "
- ></el-button>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="批次号"
- align="center"
- prop="patchNo"
- />
- <el-table-column
- show-overflow-tooltip
- label="产品批号"
- align="center"
- prop="producBatch"
- width="220px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- disabled
- size="mini"
- v-model="scope.row.producBatch"
- >
- <el-button
- size="mini"
- :disabled="sonDisable"
- slot="append"
- icon="el-icon-more"
- @click="chooseBatch(scope.$index)"
- ></el-button>
- </el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="生产日期"
- align="center"
- prop="manufactureDate"
- width="230px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-date-picker
- v-model="scope.row.manufactureDate"
- :disabled="sonDisable"
- type="date"
- size="mini"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="有效期至/失效日期"
- align="center"
- prop="periodEndDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨日期"
- align="center"
- prop="allotDate"
- width="230px"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-date-picker
- ref="findDate"
- v-model="scope.row.allotDate"
- :disabled="sonDisable"
- type="date"
- size="mini"
- :picker-options="pickerOptionsEnd"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- label="批准文号"
- align="center"
- prop="ratifyCode"
- />
- <el-table-column
- show-overflow-tooltip
- label="注册证号"
- align="center"
- prop="registration"
- />
- <el-table-column
- show-overflow-tooltip
- label="商品名"
- align="center"
- prop="productCode"
- />
- <el-table-column
- show-overflow-tooltip
- label="通用名"
- align="center"
- prop="commonCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="剂型"
- align="center"
- prop="drug"
- />
- <el-table-column
- show-overflow-tooltip
- label="调入调出结算规则明细"
- align="center"
- prop="ruleDetail"
- width="200px"
- />
- <el-table-column
- show-overflow-tooltip
- label="上市许可持有人"
- align="center"
- prop="marketingApprovalPersonal"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产许可证号/经营许可证号/备案凭证号"
- align="center"
- prop="production"
- width="270px"
- />
- <el-table-column
- show-overflow-tooltip
- label="pi码"
- align="center"
- prop="pi"
- >
- <template slot-scope="scope">
- <el-form-item class="hang">
- <el-input
- :disabled="sonDisable"
- size="mini"
- v-model="scope.row.pi"
- />
- </el-form-item>
- </template>
- </el-table-column>
- <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="备注" align="center" prop="code"/> -->
- <el-table-column
- show-overflow-tooltip
- label="类别"
- align="center"
- prop="classify"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料码"
- align="center"
- prop="customerLogistic"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料名称"
- align="center"
- prop="customerLogisticName"
- width="150px"
- />
- <el-table-column fixed="right" label="操作" align="center">
- <template slot-scope="scope">
- <el-button
- type="text"
- size="mini"
- :disabled="sonDisable"
- @click="delLine(scope.$index, scope.row)"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="收发货信息">
- <el-table
- :data="receiveInfo"
- fit
- border
- max-height="280"
- style="font-size: 12px"
- >
- <el-table-column
- show-overflow-tooltip
- label="行号"
- align="center"
- prop="rowno"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨出库单号"
- align="center"
- prop="deliveryCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨入库单号"
- align="center"
- prop="storageCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产厂家/代理人"
- align="center"
- prop="manufacturer"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产地"
- align="center"
- prop="originPlace"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="类别"
- align="center"
- prop="classify"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调出仓库"
- align="center"
- prop="deliveryWarehouseName"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调入仓库"
- align="center"
- prop="storageWarehouseName"
- width="150px"
- />
- <!-- <el-table-column show-overflow-tooltip label="收货利润中心" align="center" prop="code"/>
- <el-table-column show-overflow-tooltip label="发货利润中心" align="center" prop="code"/> -->
- <el-table-column
- show-overflow-tooltip
- label="调入业务员"
- align="center"
- prop="businessPersonalName"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产品批号"
- align="center"
- prop="productBatch"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产日期"
- align="center"
- prop="manufactureDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="有效期至/失效日期"
- align="center"
- prop="periodEndDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="批准文号"
- align="center"
- prop="ratifyCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="注册证号"
- align="center"
- prop="registration"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="商品名"
- align="center"
- prop="productCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="通用名"
- align="center"
- prop="commonCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="剂型"
- align="center"
- prop="drug"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="收货客户"
- align="center"
- prop="customerName"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="收货地址"
- align="center"
- prop="addressaddress"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="收货地区"
- align="center"
- prop="area"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="收货地点"
- align="center"
- prop="place"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="计划发货日期"
- align="center"
- prop="deliveryDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="计划到货日期"
- align="center"
- prop="strageDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="运输方式"
- align="center"
- prop="transportation"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="备注"
- align="center"
- prop="remark"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料编码"
- align="center"
- prop="customerLogistic"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料名称"
- align="center"
- prop="customerLogisticName"
- width="150px"
- />
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="价格费用">
- <el-table
- :data="priceList"
- fit
- border
- max-height="280"
- style="font-size: 12px"
- >
- <el-table-column
- show-overflow-tooltip
- label="行号"
- align="center"
- prop="rowno"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨出库单号"
- align="center"
- prop="deliveryCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨入库单号"
- align="center"
- prop="storageCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产厂家/代理人"
- align="center"
- prop="manufacturer"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产地"
- align="center"
- prop="originPlace"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="类别"
- align="center"
- prop="classify"
- width="150px"
- />
- <!-- <el-table-column show-overflow-tooltip label="税率" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="无税单价" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="含税单价" align="center" prop="code"/> -->
- <el-table-column
- show-overflow-tooltip
- label="产品批号"
- align="center"
- prop="productBatch"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产日期"
- align="center"
- prop="manufactureDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="有效期至/失效日期"
- align="center"
- prop="periodEndDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="批准文号"
- align="center"
- prop="ratifyCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="注册证号"
- align="center"
- prop="registration"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="商品名"
- align="center"
- prop="productCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="通用名"
- align="center"
- prop="commonCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="剂型"
- align="center"
- prop="drug"
- width="150px"
- />
- <!-- <el-table-column show-overflow-tooltip label="询价无税价" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="询价含税价" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="税额" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="加价率" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="价税合计" align="center" prop="code"/> -->
- <el-table-column
- show-overflow-tooltip
- label="客户物料码"
- align="center"
- prop="customerLogistic"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料名称"
- align="center"
- prop="customerLogisticName"
- width="150px"
- />
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="执行结果">
- <el-table
- :data="resultList"
- fit
- border
- max-height="280"
- style="font-size: 12px"
- >
- <el-table-column
- show-overflow-tooltip
- label="行号"
- align="center"
- prop="rowno"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨出库单号"
- align="center"
- prop="deliveryCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="调拨入库单号"
- align="center"
- prop="storageCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产厂家/代理人"
- align="center"
- prop="manufacturer"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产地"
- align="center"
- prop="originPlace"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="类别"
- align="center"
- prop="classify"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="产品批号"
- align="center"
- prop="productBatch"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="生产日期"
- align="center"
- prop="manufactureDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="有效期至/失效日期"
- align="center"
- prop="periodEndDate"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="批准文号"
- align="center"
- prop="ratifyCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="注册证号"
- align="center"
- prop="registration"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="商品名"
- align="center"
- prop="productCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="通用名"
- align="center"
- prop="commonCode"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="剂型"
- align="center"
- prop="drug"
- width="150px"
- />
- <!-- <el-table-column show-overflow-tooltip label="已调出主数量" align="center" prop="code"/>
- <el-table-column show-overflow-tooltip label="已调入主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="调拨在途主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="已发货主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="途损主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="累计退货主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算主数量" align="center" prop="code"/> -->
- <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算金额" align="center" prop="code"/> -->
- <el-table-column
- show-overflow-tooltip
- label="客户物料码"
- align="center"
- prop="customerLogistic"
- width="150px"
- />
- <el-table-column
- show-overflow-tooltip
- label="客户物料名称"
- align="center"
- prop="customerLogisticName"
- width="150px"
- />
- </el-table>
- </el-tab-pane>
- </el-tabs>
- <el-divider content-position="left">表尾信息</el-divider>
- <el-row :gutter="10">
- <el-col :span="1.5">
- <el-form-item label="制单人">
- <el-input
- v-model="basicForm.createByName"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="制单日期">
- <el-input
- v-model="basicForm.createTime"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="1.5">
- <el-form-item label="审批人">
- <el-input
- v-model="basicForm.code"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="审批日期">
- <el-input
- v-model="basicForm.code"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col> -->
- </el-row>
- <el-divider content-position="left">审计信息</el-divider>
- <el-row :gutter="10">
- <el-col :span="1.5">
- <el-form-item label="创建人">
- <el-input
- v-model="basicForm.createByName"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="创建时间">
- <el-input
- v-model="basicForm.createTime"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="1.5">
- <el-form-item label="最后修改人">
- <el-input
- v-model="basicForm.updateByName"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col>
- <el-col :span="1.5">
- <el-form-item label="最后修改时间">
- <el-input
- v-model="basicForm.updateTime"
- size="mini"
- disabled
- clearable
- style="width: 200px"
- />
- </el-form-item>
- </el-col> -->
- </el-row>
- </el-form>
- <div class="btn_group">
- <el-button
- type="primary"
- size="mini"
- plain
- @click="jumpOA"
- v-if="
- sonPageStu == 'check' &&
- (row.status == '1' || row.status == '2') &&
- row.oaId
- "
- >审批</el-button
- >
- <el-button
- type="primary"
- size="mini"
- plain
- @click="copy"
- v-if="sonPageStu == 'check'"
- >复制</el-button
- >
- <el-button
- type="primary"
- size="mini"
- plain
- @click="editPage"
- v-if="sonPageStu == 'check' && row.status == '0'"
- >编辑</el-button
- >
- <el-button
- type="danger"
- size="mini"
- plain
- @click="toNC"
- v-if="sonPageStu == 'check' && row.status == '2'"
- >重传NC</el-button
- >
- <el-button
- type="primary"
- size="mini"
- plain
- @click="save"
- v-if="sonPageStu == 'add' || sonPageStu == 'edit'"
- >保存</el-button
- >
- <el-button
- type="primary"
- size="mini"
- plain
- @click="submit"
- v-if="
- sonPageStu == 'check' && (row.status == '0' || row.status == '3')
- "
- >提交</el-button
- >
- <el-button size="mini" plain @click="back">返回</el-button>
- </div>
- </el-card>
- <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
- <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true" />
- <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
- <batchRefers ref="batchRefer" @doSubmit="selectBatch" :single="true" />
- </div>
- </template>
- <script>
- import { toOA } from "@/api/purchase/purchaseDemand.js";
- import {
- addOrder,
- getOrderDetail,
- editOrder,
- submitOrder,
- againToNC,
- } from "@/api/purchase/transferOrder.js";
- import Refers from "@/components/Refers/refers.vue";
- // 用于回显参照框数据
- import { getRefer } from "@/api/purchase/basic.js";
- import TreeRefers from "@/components/Refers/treeRefer.vue";
- // 明细行选择物料参照
- import popDialog from "@/components/PopDialog/index.vue";
- // 明细行选择批次号
- import batchRefers from "@/components/Refers/batchRefer.vue";
- export default {
- name: "addOder",
- dicts: [
- "sys_allot_billtype",
- "sys_project_group",
- "sys_status",
- "sys_to_type",
- ],
- props: ["pageStu", "row", "disable"],
- components: {
- Refers,
- TreeRefers,
- popDialog,
- batchRefers,
- },
- model: {
- prop: "isList",
- event: "jugislist",
- },
- data() {
- return {
- loading: true,
- // 不能直接改变props传来的值
- sonPageStu: this.pageStu,
- sonDisable: this.disable,
- basicForm: {
- deliveryInventoryOrg: "",
- deliveryInventoryOrgCode: "",
- deliveryInventoryOrgName: "",
- billType: "",
- code: "",
- billDate: "",
- allotType: "",
- deliveryCode: "",
- storageCode: "",
- storageInventoryOrg: "",
- storageInventory: "",
- storageInventoryOrgName: "",
- businessPersonal: "",
- businessPersonalName: "",
- deliveryDept: "",
- deliveryDeptName: "",
- currency: "",
- currencyName: "",
- rate: 1,
- onRouteAffilliation: "",
- oaId: '',
- qty: "",
- accountPath: "",
- customer: "",
- customerName: "",
- deliveryWarehouse: "",
- deliveryWarehouseCode: "",
- deliveryWarehouseName: "",
- storageWarehouse: "",
- storageWarehouseName: "",
- materialProject: "",
- liacenter: "",
- liacenterName: "",
- sourceIdentification: "",
- remark: "",
- ncCode: "",
- isSendWms: "",
- status: "0",
- tenantId: "",
- revision: "",
- createByName: "",
- updateByName: "",
- delFlag: "",
- },
- referCondition: {
- type: "",
- isPage: true,
- title: "",
- // 仓库编码
- stordocId: "",
- orgCode: "",
- materialCode: "",
- unitCode: "",
- warehouseCode: "",
- },
- options: [
- {
- value: "Y",
- label: "是",
- },
- {
- value: "N",
- label: "否",
- },
- ],
- tableIndex: null,
- chuOrgOptions: [],
- ruOrgOptions: [],
- manOptions: [],
- deptOptions: [],
- currencyOptions: [],
- customerOptions: [],
- ruHouseOptions: [],
- chuHouseOptions: [],
- liacenterOptions: [],
- basicRules: {},
- materialInfo: [],
- receiveInfo: [],
- priceList: [],
- resultList: [],
- pickerOptionsEnd: {
- disabledDate: (time) => {
- let beginDateVal = this.basicForm.billDate;
- if (beginDateVal) {
- return time.getTime() < new Date(beginDateVal).getTime() - 8.64e7;
- }
- },
- },
- isOrg: true,
- isDRCk: true,
- isDCCk: true,
- };
- },
- created() {
- if (this.pageStu == "check") {
- console.log("数据", this.row);
- this.getDetails(this.row);
- } else if (this.pageStu == "edit") {
- this.getDetails(this.row);
- this.isDRCk = false;
- this.isDCCk = false;
- } else if (this.pageStu == "add") {
- this.loading = false
- }
- },
- methods: {
- // 改变单据日期时清空子表的调拨日期
- changeBillDate() {
- this.materialInfo.forEach((item) => {
- item.allotDate = null;
- });
- },
- // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
- controlCk(val) {
- if (val = '调出库存组织') {console.log("进了吗");}
- if (
- this.basicForm.deliveryInventoryOrg &&
- this.basicForm.storageInventoryOrg
- ) {
- this.isOrg = false;
- } else {
- this.basicForm.deliveryDept = "";
- this.basicForm.storageWarehouse = "";
- this.basicForm.deliveryWarehouse = "";
- this.isOrg = true;
- // 选择调入库存组织时判断调拨方式
- this.basicForm.allotType = "";
- }
- },
- // 控制子表内货位是否可以填写,根据选择仓库内csFlag
- controlDCHW() {
- console.log("🚀 ~ file: add.vue:735 调出货位");
- this.isDCCk = true;
- this.materialInfo.forEach((item) => {
- item.deliveryAllocation = null;
- item.deliveryAllocationName = null;
- });
- },
- controlDRHW() {
- console.log("🚀 ~ file: add.vue:735 调入货位");
- this.isDRCk = true;
- this.materialInfo.forEach((item) => {
- item.storageAllocation = null;
- item.storageAllocationName = null;
- });
- },
- // 输入数量或者主数量同步改变,计算基本信息总数量
- getZSL(scope) {
- scope.row.qty = scope.row.mainQty;
- let sum = 0
- this.materialInfo.forEach(item => {
- sum += Number(item.qty)
- this.basicForm.qty = sum
- })
- },
- getSL(scope) {
- scope.row.mainQty = scope.row.qty;
- let sum = 0
- this.materialInfo.forEach(item => {
- sum += Number(item.qty)
- this.basicForm.qty = sum
- })
- },
- copy() {
- // await this.getDetails(this.row)
- this.$modal.notifySuccess("复制成功");
- this.sonPageStu = "add";
- this.sonDisable = false;
- this.basicForm.id = "";
- this.basicForm.code = "";
- this.basicForm.createByName = "";
- this.basicForm.createBy = "";
- this.basicForm.createTime = "";
- this.basicForm.isSendWms = "";
- this.basicForm.ncCode = "";
- this.basicForm.oaId = "";
- this.basicForm.updateBy = "";
- this.basicForm.updateByName = "";
- this.basicForm.updateTime = "";
- this.basicForm.storageCode = "";
- this.basicForm.deliveryCode = "";
- // 复制新增把id,编码,创建人置为空,子表去掉id
- if (this.materialInfo.length !== 0) {
- this.materialInfo.forEach((item) => {
- if (item.deliveryCode) {
- item.deliveryCode = "";
- }
- if (item.storageCode) {
- item.storageCode = "";
- }
- if (item.demandCode) {
- item.demandCode = "";
- }
- if (item.allotId) {
- delete item.allotId;
- }
- if (item.id) {
- delete item.id;
- }
- if (item.createBy) {
- delete item.createBy;
- delete item.createByName;
- delete item.createTime;
- }
- if (item.updateBy) {
- delete item.updateBy;
- delete item.updateByName;
- delete item.updateTime;
- }
- });
- }
- this.isDRCk = false;
- this.isDCCk = false;
- },
- editPage() {
- this.sonPageStu = 'edit'
- this.sonDisable = false
- },
- toNC() {
- againToNC(this.row)
- .then((res) => {
- this.getDetails(this.row);
- })
- .catch((err) => {
- this.getDetails(this.row);
- });
- },
- submit() {
- this.$modal.loading("提交中...");
- this.basicForm.stAllotMaterialList = this.materialInfo;
- this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
- this.basicForm.stAllotReceiveExecuteList = this.priceList;
- this.basicForm.stAllotReceiveExpenseList = this.resultList;
- submitOrder(this.basicForm)
- .then((res) => {
- if (res.code === 200) {
- this.$modal.closeLoading();
- this.$modal.notifySuccess("提交成功");
- this.back();
- }
- })
- .catch((err) => {
- this.$modal.closeLoading();
- });
- },
- save() {
- if (this.materialInfo.length !== 0) {
- if (this.sonPageStu == "add") {
- this.basicForm.stAllotMaterialList = this.materialInfo;
- this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
- this.basicForm.stAllotReceiveExecuteList = this.priceList;
- this.basicForm.stAllotReceiveExpenseList = this.resultList;
- this.$modal.loading("保存中...");
- addOrder(this.basicForm)
- .then((res) => {
- if (res.code === 200) {
- this.$modal.notifySuccess("保存成功");
- this.$modal.closeLoading();
- this.back();
- }
- })
- .catch((err) => {
- this.$modal.closeLoading();
- });
- } else if (this.sonPageStu == "edit") {
- this.basicForm.stAllotMaterialList = this.materialInfo;
- this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
- this.basicForm.stAllotReceiveExecuteList = this.priceList;
- this.basicForm.stAllotReceiveExpenseList = this.resultList;
- this.$modal.loading("保存中...");
- editOrder(this.basicForm)
- .then((res) => {
- if (res.code === 200) {
- this.$modal.notifySuccess("编辑成功");
- this.$modal.closeLoading();
- this.back();
- }
- })
- .catch((err) => {
- this.$modal.closeLoading();
- });
- }
- } else {
- this.$modal.notifyWarning("明细行不能为空");
- }
- },
- back() {
- this.$emit("jugislist", true);
- // let queryParams = {
- // pageNum: 1,
- // pageSize: 5
- // }
- this.$emit("refresh");
- },
- // 如果需要回显则调用详情接口
- getDetails(row) {
- getOrderDetail(row.id).then((res) => {
- if (res.code === 200) {
- this.basicForm = res.data;
- this.materialInfo = res.data.stAllotMaterialList;
- this.receiveInfo = res.data.stAllotReceiveDeliverList;
- this.priceList = res.data.stAllotReceiveExecuteList;
- this.resultList = res.data.stAllotReceiveExpenseList;
- if (this.basicForm.deliveryInventoryOrg) {
- this.reBackRefer(
- "ORG_PARAM",
- this.basicForm.deliveryInventoryOrg,
- "调出库存组织"
- );
- }
- if (this.basicForm.storageInventoryOrg) {
- this.reBackRefer(
- "ORG_PARAM",
- this.basicForm.storageInventoryOrg,
- "调入库存组织"
- );
- }
- if (this.basicForm.businessPersonal) {
- this.reBackRefer("CONTACTS_PARAM", this.basicForm.businessPersonal);
- }
- if (this.basicForm.deliveryDept) {
- this.reBackRefer("DEPT_PARAM", this.basicForm.deliveryDept);
- }
- if (this.basicForm.currency) {
- this.reBackRefer("CURRENCY_PARAM", this.basicForm.currency);
- }
- // 客户
- if (this.basicForm.customer) {
- this.reBackRefer("CUSTOMER_PARAM", this.basicForm.customer);
- }
- if (this.basicForm.storageWarehouse) {
- this.reBackRefer(
- "WAREHOUSE_PARAM",
- this.basicForm.storageWarehouse,
- "调入仓库"
- );
- }
- if (this.basicForm.deliveryWarehouse) {
- this.reBackRefer(
- "WAREHOUSE_PARAM",
- this.basicForm.deliveryWarehouse,
- "调出仓库"
- );
- }
- if (this.basicForm.liacenter) {
- this.reBackRefer("LIACENTER_PARAM", this.basicForm.liacenter);
- }
- // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
- this.controlCk();
- }
- }).then(() => {
- this.loading = false
- }).catch(err => {
- this.loading = false
- })
- },
- // 回显参照框
- reBackRefer(type, id, title) {
- getRefer({ type: type, id: id, title: title }).then((res) => {
- if (type == "ORG_PARAM" && title == "调出库存组织") {
- this.chuOrgOptions = res.rows;
- }
- if (type == "ORG_PARAM" && title == "调入库存组织") {
- this.ruOrgOptions = res.rows;
- }
- if (type == "CONTACTS_PARAM") {
- this.manOptions = res.rows;
- }
- if (type == "DEPT_PARAM") {
- this.deptOptions = res.rows;
- }
- if (type == "CURRENCY_PARAM") {
- this.currencyOptions = res.rows;
- }
- if (type == "LIACENTER_PARAM") {
- this.liacenterOptions = res.rows;
- }
- if (type == "CUSTOMER_PARAM") {
- this.customerOptions = res.rows;
- }
- if (type == "WAREHOUSE_PARAM" && title == "调入仓库") {
- this.ruHouseOptions = res.rows;
- }
- if (type == "WAREHOUSE_PARAM" && title == "调出仓库") {
- this.chuHouseOptions = res.rows;
- }
- if (type == "UNIT_PARAM") {
- this.materialInfo[this.tableIndex].unitCode = res.rows[0].code;
- }
- });
- },
- addLine() {
- const newLine = {
- rowno: null,
- demandCode: null,
- material: null,
- materialCode: null,
- materialName: null,
- deliveryCode: null,
- storageCode: null,
- specification: null,
- manufacturer: null,
- originPlace: null,
- originPlaceName: null,
- model: null,
- unit: null,
- unitCode: null,
- unitName: null,
- deliveryWarehouseName: null,
- qty: null,
- mainUnit: null,
- mainUnitName: null,
- equation: "1/1",
- mainQty: null,
- rate: "0.00",
- storageWarehouseName: null,
- deliveryAllocationName: null,
- deliveryAllocation: null,
- storageDept: null,
- storageDeptName: null,
- storageAllocationName: null,
- storageAllocation: null,
- patchNo: null,
- producBatch: null,
- manufactureDate: null,
- periodEndDate: null,
- allotDate: null,
- ratifyCode: null,
- registration: null,
- productCode: null,
- commonCode: null,
- drug: null,
- ruleDetail: null,
- marketingApprovalPersonal: null,
- production: null,
- pi: null,
- classify: null,
- customerLogistic: null,
- customerLogisticName: null,
- delFlag: 0,
- };
- this.materialInfo.push(newLine);
- },
- delLine($index) {
- console.log("删除行:", $index);
- this.materialInfo = this.materialInfo.map((item, index) => ({
- ...item,
- delFlag: index === $index ? "2" : item.delFlag,
- }));
- console.log("看看列表", this.materialInfo);
- },
- //
- rowClassName(prop) {
- const {
- row: { delFlag },
- } = prop;
- if (delFlag === "2") {
- return "is-hidden";
- } else {
- return "";
- }
- },
- chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
- this.referCondition.type = type;
- this.referCondition.isPage = isPage;
- this.referCondition.title = title;
- this.referCondition.pkOrg = pkOrg;
- this.referCondition.isDirectStore = isDirectStore;
- this.referCondition.gubFlag = gubFlag;
- this.$refs.refer.init(this.referCondition);
- },
- selectionsToInput(selection) {
- if (this.referCondition.title == "调出库存组织") {
- this.chuOrgOptions = selection;
- this.basicForm.deliveryInventoryOrg = selection[0].id;
- this.basicForm.deliveryInventoryOrgCode = selection[0].code;
- this.basicForm.deliveryInventoryOrgName = selection[0].name;
- this.clearDCZZ()
- }
- if (this.referCondition.title == "调入库存组织") {
- this.ruOrgOptions = selection;
- this.basicForm.storageInventoryOrg = selection[0].id;
- this.basicForm.storageInventory = selection[0].code;
- this.basicForm.storageInventoryOrgName = selection[0].name;
- this.basicForm.onRouteAffilliation = selection[0].name;
- this.clearDRZZ()
- }
- if (this.referCondition.title == "调出业务员") {
- this.manOptions = selection;
- this.basicForm.businessPersonal = selection[0].code;
- this.basicForm.businessPersonalName = selection[0].name;
- }
- if (this.referCondition.title == "调出部门") {
- this.deptOptions = selection;
- this.basicForm.deliveryDept = selection[0].id;
- this.basicForm.deliveryDeptName = selection[0].name;
- }
- if (this.referCondition.title == "币种") {
- this.currencyOptions = selection;
- this.basicForm.currency = selection[0].id;
- this.basicForm.currencyName = selection[0].name;
- }
- if (this.referCondition.title == "客户") {
- this.customerOptions = selection;
- this.basicForm.customer = selection[0].id;
- this.basicForm.customerName = selection[0].name;
- }
- if (this.referCondition.title == "调入仓库") {
- this.ruHouseOptions = selection;
- this.basicForm.storageWarehouse = selection[0].id;
- this.basicForm.storageWarehouseName = selection[0].name;
- console.log("1111", selection[0].csFlag);
- // 清空调入货位
- this.materialInfo.forEach((item) => {
- item.storageAllocation = null;
- item.storageAllocationName = null;
- });
- if (selection[0].csFlag == "N") {
- this.isDRCk = true;
- } else {
- this.isDRCk = false;
- }
- }
- if (this.referCondition.title == "调出仓库") {
- this.chuHouseOptions = selection;
- this.basicForm.deliveryWarehouse = selection[0].id;
- this.basicForm.deliveryWarehouseCode = selection[0].code;
- this.basicForm.deliveryWarehouseName = selection[0].name;
- console.log("2222", selection[0].csFlag);
- // 清空调出货位
- this.materialInfo.forEach((item) => {
- item.deliveryAllocation = null;
- item.deliveryAllocationName = null;
- });
- if (selection[0].csFlag == "N") {
- this.isDCCk = true;
- } else {
- this.isDCCk = false;
- }
- }
- if (this.referCondition.title == "调出货位") {
- this.materialInfo[this.tableIndex].deliveryAllocationName =
- selection[0].name;
- this.materialInfo[this.tableIndex].deliveryAllocation = selection[0].id;
- }
- if (this.referCondition.title == "调入货位") {
- this.materialInfo[this.tableIndex].storageAllocationName =
- selection[0].name;
- this.materialInfo[this.tableIndex].storageAllocation = selection[0].id;
- }
- if (this.referCondition.title == "调入部门") {
- this.materialInfo[this.tableIndex].storageDeptName = selection[0].name;
- this.materialInfo[this.tableIndex].storageDept = selection[0].id;
- }
- // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
- this.controlCk();
- },
- // 调出库存组织清空相关数据
- clearDCZZ() {
- // 清空调出仓库,部门
- this.basicForm.deliveryWarehouse = "";
- this.basicForm.deliveryWarehouseCode = "";
- this.basicForm.deliveryWarehouseName = "";
- this.basicForm.deliveryDept = "";
- this.basicForm.deliveryDeptName = "";
- // 清空调出货位且禁用
- this.materialInfo.forEach((item) => {
- item.deliveryAllocation = null;
- item.deliveryAllocationName = null;
- });
- this.isDCCk = true;
- // 选择调入库存组织时判断调拨方式
- if (
- this.basicForm.storageInventoryOrg ==
- this.basicForm.deliveryInventoryOrg
- ) {
- this.basicForm.allotType = "4";
- } else {
- this.basicForm.allotType = "2";
- }
- },
- // 调入库存组织清空相关数据
- clearDRZZ() {
- // 选择调入库存组织清空仓库
- this.basicForm.storageWarehouse = "";
- this.basicForm.storageWarehouseName = "";
- // 清空调入部门
- this.materialInfo.forEach((item) => {
- item.storageDept = null;
- item.storageDeptName = null;
- });
- // 清空调入货位且禁用
- this.materialInfo.forEach((item) => {
- item.storageAllocation = null;
- item.storageAllocationName = null;
- });
- this.isDRCk = true
- // 选择调入库存组织时判断调拨方式
- if (
- this.basicForm.storageInventoryOrg ==
- this.basicForm.deliveryInventoryOrg
- ) {
- this.basicForm.allotType = "4";
- } else {
- this.basicForm.allotType = "2";
- }
- },
- chooseTreeRefer(type, isPage, title) {
- this.referCondition.type = type;
- this.referCondition.isPage = isPage;
- this.referCondition.title = title;
- this.$refs.tree.init(this.referCondition);
- },
- selectionsToInput2(selection) {
- this.liacenterOptions.push(selection);
- this.basicForm.liacenter = selection.id;
- this.basicForm.liacenterName = selection.name;
- },
- // 明细行选择物料编码带出数据
- chooseMaterial(index) {
- console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
- this.tableIndex = index;
- this.$refs.materialRefer.init();
- },
- selectMaterial(selection) {
- console.log("选中的物料", selection);
- // 先清空通用名,调入调出结算规则明细
- this.materialInfo[this.tableIndex].ruleDetail = ''
- this.materialInfo[this.tableIndex].commonCode = ''
- this.materialInfo[this.tableIndex].material = selection[0].id;
- this.materialInfo[this.tableIndex].materialCode = selection[0].code;
- this.materialInfo[this.tableIndex].materialName = selection[0].name;
- this.materialInfo[this.tableIndex].specification = selection[0].specification;
- this.materialInfo[this.tableIndex].model = selection[0].model;
- this.materialInfo[this.tableIndex].originPlace = selection[0].originPlace;
- this.materialInfo[this.tableIndex].originPlaceName = selection[0].originPlaceName;
- this.materialInfo[this.tableIndex].unit = selection[0].unitId;
- this.materialInfo[this.tableIndex].mainUnit = selection[0].unitId;
- this.materialInfo[this.tableIndex].unitName = selection[0].unitIdName;
- this.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName;
- this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName;
- this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant;
- this.materialInfo[this.tableIndex].production = selection[0].productionPermit;
- // 根据物料单位id查询单位code
- this.reBackRefer("UNIT_PARAM", selection[0].unitId);
- },
- // 明细行选择批次号
- chooseBatch(index) {
- this.tableIndex = index;
- this.referCondition.orgId = this.basicForm.deliveryInventoryOrg;
- this.referCondition.materialCode =
- this.materialInfo[this.tableIndex].materialCode;
- this.referCondition.unitId = this.materialInfo[this.tableIndex].unit;
- this.referCondition.warehouseId = this.basicForm.deliveryWarehouse;
- this.$refs.batchRefer.init(this.referCondition);
- },
- selectBatch(selection) {
- console.log("选中的批次号", selection);
- },
- // 明细行选择货位
- chooseMxHW(index, type, isPage, title, stordocId) {
- this.tableIndex = index;
- this.referCondition.type = type;
- this.referCondition.isPage = isPage;
- this.referCondition.title = title;
- this.referCondition.pkOrg = "";
- this.referCondition.stordocId = stordocId;
- this.$refs.refer.init(this.referCondition);
- },
- // 明细行选择调入部门
- chooseMxBM(index, type, isPage, title, pkOrg) {
- this.tableIndex = index;
- this.referCondition.type = type;
- this.referCondition.isPage = isPage;
- this.referCondition.title = title;
- this.referCondition.pkOrg = pkOrg;
- this.$refs.refer.init(this.referCondition);
- },
- // 选择框彻底清空
- clean(val) {
- if (val == "调出库存组织") {
- this.clearDCZZ()
- }
- if (val == "调入库存组织") {
- this.clearDRZZ()
- }
- if (val == "调出业务员") {
- this.basicForm.businessPersonal = "";
- this.basicForm.businessPersonalName = "";
- }
- if (val == "调入仓库") {
- this.basicForm.storageWarehouse = "";
- this.basicForm.storageWarehouseName = "";
- this.materialInfo.forEach((item) => {
- item.storageAllocation = null;
- item.storageAllocationName = null;
- });
- this.isDRCk = true
- }
- if (val == "调出仓库") {
- this.basicForm.deliveryWarehouse = "";
- this.basicForm.deliveryWarehouseCode = "";
- this.basicForm.deliveryWarehouseName = "";
- }
- if (val == "利润中心") {
- this.basicForm.liacenter = "";
- this.basicForm.liacenterName = "";
- }
- },
- // 明细选择框清空
- cleanMx(index, val) {
- if (val == "物料编码") {
- this.materialInfo[index].material = "";
- this.materialInfo[index].materialCode = "";
- this.materialInfo[index].materialName = "";
- this.materialInfo[index].specification = "";
- this.materialInfo[index].model = "";
- this.materialInfo[index].originPlace = "";
- this.materialInfo[index].originPlaceName = "";
- this.materialInfo[index].unit = "";
- this.materialInfo[index].mainUnit = "";
- this.materialInfo[index].unitName = "";
- this.materialInfo[index].mainUnitName = "";
- this.materialInfo[index].manufacturer = "";
- this.materialInfo[index].ruleDetail = ''
- this.materialInfo[index].commonCode = ''
- this.materialInfo[index].marketingApprovalPersonal = "";
- this.materialInfo[index].production = "";
- this.materialInfo[index].unitCode = "";
- }
- if (val == "调出货位") {
- this.materialInfo[index].deliveryAllocationName = "";
- this.materialInfo[index].deliveryAllocation = "";
- }
- if (val == "调入部门") {
- this.materialInfo[index].storageDeptName = "";
- this.materialInfo[index].storageDept = "";
- }
- if (val == "调入货位") {
- this.materialInfo[index].storageAllocationName = "";
- this.materialInfo[index].storageAllocation = "";
- }
- },
- jumpOA() {
- toOA(this.$store.state.user.name, this.basicForm.oaId).then((res) => {
- if (res.code === 200) {
- window.open(res.oaUrl);
- }
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-table__row.is-hidden {
- display: none;
- }
- .btn_group {
- // width: 100%;
- // margin: 20px 0;
- display: flex;
- // justify-content: center;
- position: absolute;
- top: 10px;
- right: 20px;
- }
- .btn_grooup {
- margin-bottom: 10px;
- display: flex;
- justify-content: flex-end;
- }
- .hang {
- margin: auto;
- }
- .hang ::v-deep .el-form-item__content {
- margin-left: 0px !important;
- }
- ::v-deep .el-table__row > td {
- border-right: none;
- }
- </style>
|