add.vue 109 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229
  1. <template>
  2. <div id="addDemandList">
  3. <el-card style="position: relative">
  4. <span>基本信息</span>
  5. <el-form
  6. :model="basicForm"
  7. :rules="basicRules"
  8. ref="basic"
  9. label-width="auto"
  10. :show-message="false"
  11. >
  12. <el-row :gutter="10">
  13. <el-col :span="1.5">
  14. <el-form-item
  15. label="业务类型"
  16. prop="billType"
  17. :rules="{
  18. required: true,
  19. message: '请选择业务类型',
  20. trigger: 'blur',
  21. }"
  22. >
  23. <el-select
  24. clearable
  25. v-model="basicForm.billType"
  26. @change="changeBillType(basicForm.billType)"
  27. :disabled="sonDisable"
  28. :size="size"
  29. style="width: 200px"
  30. >
  31. <el-option
  32. v-for="dict in dict.type.sys_business"
  33. :key="dict.value"
  34. :label="dict.label"
  35. :value="dict.value"
  36. >
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="1.5">
  42. <el-form-item label="需求客户">
  43. <el-select
  44. clearable
  45. :size="size"
  46. v-model="basicForm.customer"
  47. :disabled="sonDisable"
  48. @clear="cleanCustomer"
  49. @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')"
  50. style="width: 200px"
  51. >
  52. <el-option
  53. v-for="item in customerOptions"
  54. :key="item.id"
  55. :label="item.name"
  56. :value="item.id"
  57. />
  58. </el-select>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="1.5">
  62. <el-form-item label="需求人员">
  63. <el-select
  64. clearable
  65. :size="size"
  66. v-model="basicForm.demandPersonal"
  67. :disabled="sonDisable"
  68. @focus="chooseOrg('CONTACTS_PARAM', true, '需求人员')"
  69. style="width: 200px"
  70. >
  71. <el-option
  72. v-for="item in personOptions"
  73. :key="item.id"
  74. :label="item.name"
  75. :value="item.code"
  76. />
  77. </el-select>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="1.5">
  81. <el-form-item
  82. label="需求部门"
  83. prop="demandDept"
  84. :rules="{
  85. required: true,
  86. message: '请选择需求部门',
  87. trigger: 'blur',
  88. }"
  89. >
  90. <el-select
  91. clearable
  92. v-model="basicForm.demandDept"
  93. :size="size"
  94. :disabled="sonDisable"
  95. @focus="chooseOrg('DEPT_PARAM', true, '需求部门')"
  96. style="width: 200px"
  97. >
  98. <el-option
  99. v-for="item in deptOptions"
  100. :key="item.id"
  101. :label="item.name"
  102. :value="item.id"
  103. >
  104. </el-option>
  105. </el-select>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="1.5">
  109. <el-form-item
  110. label="需求计划"
  111. prop="planType"
  112. :rules="{
  113. required: true,
  114. message: '请选择需求计划',
  115. trigger: 'blur',
  116. }"
  117. >
  118. <el-select
  119. :disabled="sonDisable"
  120. v-model="basicForm.planType"
  121. :size="size"
  122. style="width: 200px"
  123. @change="changeplanType(basicForm.planType)"
  124. >
  125. <el-option
  126. v-for="dict in dict.type.sys_plan_type"
  127. :key="dict.value"
  128. :label="dict.label"
  129. :value="dict.value"
  130. >
  131. </el-option>
  132. </el-select>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="1.5">
  136. <el-form-item
  137. label="需求日期"
  138. prop="demandDate"
  139. :rules="{
  140. required: true,
  141. message: '请选择需求日期',
  142. trigger: 'blur',
  143. }"
  144. >
  145. <el-date-picker
  146. v-model="basicForm.demandDate"
  147. disabled
  148. clearable
  149. type="date"
  150. value-format="yyyy-MM-dd"
  151. @change="changeDemandDate"
  152. :size="size"
  153. style="width: 200px"
  154. >
  155. </el-date-picker>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="1.5">
  159. <el-form-item label="制单日期" prop="createTime">
  160. <el-date-picker
  161. v-model="basicForm.createTime"
  162. disabled
  163. clearable
  164. type="date"
  165. value-format="yyyy-MM-dd"
  166. :size="size"
  167. style="width: 200px"
  168. >
  169. </el-date-picker>
  170. </el-form-item>
  171. </el-col>
  172. <el-col :span="1.5">
  173. <el-form-item label="是否客户指定">
  174. <el-select
  175. clearable
  176. @change="isCustomer"
  177. v-model="basicForm.isCustomerSpecified"
  178. :disabled="sonDisable"
  179. :size="size"
  180. style="width: 200px"
  181. >
  182. <el-option
  183. v-for="item in dict.type.sys_yes_no"
  184. :key="item.value"
  185. :label="item.label"
  186. :value="item.value"
  187. >
  188. </el-option>
  189. </el-select>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="1.5">
  193. <el-form-item label="备注">
  194. <el-input
  195. v-model.trim="basicForm.remark"
  196. :size="size"
  197. :disabled="sonDisable"
  198. clearable
  199. style="width: 200px"
  200. />
  201. </el-form-item>
  202. </el-col>
  203. <!-- <el-col :span="1.5">
  204. <el-form-item label="需求客户名称">
  205. <el-input disabled v-model="basicForm.customerName" :size="size" style="width: 200px"></el-input>
  206. </el-form-item>
  207. </el-col> -->
  208. <el-col :span="1.5">
  209. <el-form-item label="需求单号">
  210. <el-input
  211. v-model="basicForm.code"
  212. :size="size"
  213. disabled
  214. style="width: 200px"
  215. />
  216. </el-form-item>
  217. </el-col>
  218. <!-- <el-col :span="1.5">
  219. <el-form-item label="组织" prop="org" :rules="{ required: true, message: '请选择组织', trigger: 'blur' }">
  220. <el-select clearable :size="size" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
  221. <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
  222. </el-select>
  223. </el-form-item>
  224. </el-col> -->
  225. <el-col :span="1.5">
  226. <el-form-item label="单据状态">
  227. <el-select
  228. disabled
  229. v-model="basicForm.status"
  230. :size="size"
  231. style="width: 200px"
  232. >
  233. <el-option
  234. v-for="dict in dict.type.sys_status"
  235. :key="dict.value"
  236. :label="dict.label"
  237. :value="dict.value"
  238. >
  239. </el-option>
  240. </el-select>
  241. </el-form-item>
  242. </el-col>
  243. <el-col :span="1.5">
  244. <el-form-item label="客户负责人">
  245. <el-select
  246. disabled
  247. :size="size"
  248. v-model="basicForm.customerPrincipal"
  249. style="width: 200px"
  250. >
  251. <el-option
  252. v-for="item in manOptions"
  253. :key="item.id"
  254. :label="item.name"
  255. :value="item.code"
  256. />
  257. </el-select>
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="1.5">
  261. <el-form-item label="单据来源">
  262. <el-select
  263. v-model="basicForm.source"
  264. disabled
  265. :size="size"
  266. style="width: 200px"
  267. >
  268. <el-option
  269. v-for="dict in dict.type.sys_bill_source"
  270. :key="dict.value"
  271. :label="dict.label"
  272. :value="dict.value"
  273. >
  274. </el-option>
  275. </el-select>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="1.5">
  279. <el-form-item label="是否超需求可用周期">
  280. <el-select
  281. v-model="basicForm.isBeyondRap"
  282. disabled
  283. :size="size"
  284. style="width: 200px"
  285. >
  286. <el-option
  287. v-for="item in dict.type.sys_yes_no"
  288. :key="item.value"
  289. :label="item.label"
  290. :value="item.value"
  291. >
  292. </el-option>
  293. </el-select>
  294. </el-form-item>
  295. </el-col>
  296. </el-row>
  297. <div class="btn_grooup">
  298. <span>明细信息</span>
  299. <div>
  300. <el-button
  301. type="primary"
  302. :size="size"
  303. @click="addLine"
  304. v-if="!sonDisable"
  305. >增行</el-button
  306. >
  307. <el-button
  308. type="primary"
  309. :size="size"
  310. @click="delLines"
  311. v-if="!sonDisable"
  312. >删行</el-button
  313. >
  314. <el-button
  315. type="primary"
  316. :size="size"
  317. v-if="!sonDisable"
  318. @click.stop="adjustPl"
  319. >批量调整</el-button
  320. >
  321. <el-button
  322. type="primary"
  323. :size="size"
  324. v-if="sonPageStu == 'check' || sonPageStu == 'edit'"
  325. @click="showReserved"
  326. >货权预留单</el-button
  327. >
  328. </div>
  329. </div>
  330. <ux-grid
  331. v-loading="loading"
  332. :data="basicForm.puDemandItemList"
  333. border
  334. :cell-style="{ borderColor: '#c0c0c0' }"
  335. :header-cell-style="{ borderColor: '#c0c0c0' }"
  336. class="exporttable"
  337. height="410"
  338. max-height="410"
  339. style="font-size: 12px"
  340. @selection-change="handleSelectionChange"
  341. :cell-class-name="cellClassName"
  342. ref="table"
  343. :rules="tableRules"
  344. show-header-overflow="tooltip"
  345. show-overflow="tooltip"
  346. keep-source
  347. beautifyTable
  348. show-summary
  349. :summary-method="jisuan"
  350. :checkbox-config="{ highlight: true, trigger: 'row' }"
  351. :edit-config="{ trigger: 'click', mode: 'row' }"
  352. :validConfig="{ autoPos: true }"
  353. >
  354. >
  355. <ux-table-column resizable type="checkbox" fixed="left" />
  356. <!-- <ux-table-column resizable title="序号" type="index" align="center" width="50px"/> -->
  357. <ux-table-column
  358. resizable
  359. title="行号"
  360. align="center"
  361. field="rowNo"
  362. width="50px"
  363. >
  364. <template v-slot="scope">
  365. {{ (scope.row.rowNo = scope.rowIndex + 1 + "0") }}
  366. </template>
  367. </ux-table-column>
  368. <ux-table-column
  369. resizable
  370. title="默认采购组织"
  371. align="center"
  372. field="purOrgName"
  373. width="100px"
  374. />
  375. <ux-table-column
  376. resizable
  377. title="需求客户"
  378. align="center"
  379. field="demandCustomerName"
  380. width="100px"
  381. />
  382. <ux-table-column
  383. resizable
  384. title="行状态"
  385. align="center"
  386. field="status"
  387. :formatter="hangStatus"
  388. width="100px"
  389. />
  390. <ux-table-column
  391. resizable
  392. title="物料编码"
  393. align="center"
  394. field="materialCode"
  395. width="150px"
  396. :render-header="addRedStar"
  397. :edit-render="{ autofocus: '.el-input__inner' }"
  398. >
  399. <template v-slot:edit="scope">
  400. <el-input
  401. clearable
  402. :disabled="sonDisable"
  403. :size="size"
  404. v-model="scope.row.materialCode"
  405. @paste.native="pasteMe($event, scope, scope.rowIndex)"
  406. >
  407. <el-button
  408. :size="size"
  409. :disabled="sonDisable"
  410. slot="append"
  411. icon="el-icon-more"
  412. @click="chooseMaterial(scope.rowIndex)"
  413. ></el-button>
  414. </el-input>
  415. </template>
  416. </ux-table-column>
  417. <ux-table-column
  418. resizable
  419. title="物料名称"
  420. align="center"
  421. field="materialName"
  422. width="100px"
  423. />
  424. <ux-table-column
  425. resizable
  426. title="规格"
  427. align="center"
  428. field="specification"
  429. width="50px"
  430. />
  431. <ux-table-column
  432. resizable
  433. title="型号"
  434. align="center"
  435. field="model"
  436. width="50px"
  437. />
  438. <ux-table-column
  439. resizable
  440. title="单位"
  441. align="center"
  442. field="unitName"
  443. width="50px"
  444. />
  445. <ux-table-column
  446. resizable
  447. title="生产厂家/代理人"
  448. align="center"
  449. field="manufacturerName"
  450. width="100px"
  451. />
  452. <ux-table-column
  453. resizable
  454. title="最小包装"
  455. align="center"
  456. field="minPackage"
  457. width="80px"
  458. />
  459. <ux-table-column
  460. resizable
  461. title="月均销量"
  462. align="center"
  463. field="averageQtyMonth"
  464. width="80px"
  465. />
  466. <ux-table-column
  467. resizable
  468. title="需求可用周期"
  469. align="center"
  470. field="demandPeriod"
  471. width="80px"
  472. />
  473. <ux-table-column
  474. resizable
  475. title="实际(业务)需求量"
  476. align="center"
  477. field="qty"
  478. width="150px"
  479. :render-header="addRedStar"
  480. edit-render
  481. >
  482. <template v-slot:edit="scope">
  483. <el-input
  484. type="number"
  485. min="0"
  486. clearable
  487. :disabled="sonDisable"
  488. :size="size"
  489. v-model="scope.row.qty"
  490. @paste.native="pasteMe($event, scope, scope.rowIndex)"
  491. />
  492. </template>
  493. </ux-table-column>
  494. <ux-table-column
  495. resizable
  496. title="紧急标识"
  497. align="center"
  498. field="isUrgency"
  499. width="100px"
  500. edit-render
  501. >
  502. <template v-slot:edit="scope">
  503. <el-switch
  504. v-model="scope.row.isUrgency"
  505. :disabled="sonDisable"
  506. active-value="Y"
  507. inactive-value="N"
  508. active-color="#13ce66"
  509. inactive-color="#a1a3a9"
  510. >
  511. </el-switch>
  512. </template>
  513. <template v-slot="{ row }">{{
  514. row.isUrgency == "Y" ? "是" : "否"
  515. }}</template>
  516. </ux-table-column>
  517. <ux-table-column
  518. resizable
  519. title="收货仓库"
  520. align="center"
  521. field="deliveryWarehouseName"
  522. width="200px"
  523. edit-render
  524. >
  525. <template v-slot:edit="scope">
  526. <el-input
  527. clearable
  528. :disabled="sonDisable"
  529. :size="size"
  530. v-model="scope.row.deliveryWarehouseName"
  531. @clear="clearHang(scope.rowIndex, '选择收货仓库')"
  532. >
  533. <el-button
  534. :size="size"
  535. :disabled="sonDisable"
  536. slot="append"
  537. icon="el-icon-more"
  538. @click="
  539. chooseCangKu(
  540. scope.rowIndex,
  541. 'WAREHOUSE_PARAM',
  542. true,
  543. '选择收货仓库',
  544. scope.row.puOrg
  545. )
  546. "
  547. ></el-button>
  548. </el-input>
  549. </template>
  550. </ux-table-column>
  551. <ux-table-column
  552. resizable
  553. title="收货货位"
  554. align="center"
  555. field="deliveryAllocationName"
  556. width="200px"
  557. edit-render
  558. >
  559. <template v-slot:edit="scope">
  560. <el-input
  561. clearable
  562. :disabled="sonDisable"
  563. :size="size"
  564. v-model="scope.row.deliveryAllocationName"
  565. @clear="clearHang(scope.rowIndex, '选择收货货位')"
  566. >
  567. <el-button
  568. :size="size"
  569. :disabled="sonDisable"
  570. slot="append"
  571. icon="el-icon-more"
  572. @click="
  573. choosehuoWei(
  574. scope.rowIndex,
  575. 'ALLOCATION_PARAM',
  576. true,
  577. '选择收货货位',
  578. scope.row.deliveryWarehouse
  579. )
  580. "
  581. ></el-button>
  582. </el-input>
  583. </template>
  584. </ux-table-column>
  585. <ux-table-column
  586. resizable
  587. title="业务备注"
  588. align="center"
  589. field="remark"
  590. width="150px"
  591. edit-render
  592. >
  593. <template v-slot:edit="scope">
  594. <el-input
  595. clearable
  596. :disabled="sonDisable"
  597. :size="size"
  598. v-model="scope.row.remark"
  599. />
  600. </template>
  601. </ux-table-column>
  602. <ux-table-column
  603. resizable
  604. title="物料一级分类"
  605. align="center"
  606. field="materialClassifyOneName"
  607. width="100px"
  608. />
  609. <ux-table-column
  610. resizable
  611. title="物料二级分类"
  612. align="center"
  613. field="materialClassifyTwoName"
  614. width="100px"
  615. />
  616. <ux-table-column
  617. resizable
  618. title="物料三级分类"
  619. align="center"
  620. field="materialClassifyThreeName"
  621. width="100px"
  622. />
  623. <ux-table-column
  624. resizable
  625. title="物料四级分类"
  626. align="center"
  627. field="materialClassifyFourName"
  628. width="100px"
  629. />
  630. <ux-table-column
  631. resizable
  632. title="最小批量"
  633. align="center"
  634. field="minBatch"
  635. width="100px"
  636. />
  637. <ux-table-column
  638. resizable
  639. title="最小订货量"
  640. align="center"
  641. field="minOrderQty"
  642. width="100px"
  643. />
  644. <ux-table-column
  645. resizable
  646. title="采购员"
  647. align="center"
  648. field="buyerName"
  649. width="100px"
  650. />
  651. <!-- <ux-table-column resizable title="采购员" align="center" field="buyer"/> -->
  652. <ux-table-column
  653. resizable
  654. title="采购周期"
  655. align="center"
  656. field="puPeriod"
  657. width="100px"
  658. />
  659. <ux-table-column
  660. resizable
  661. title="交货日期"
  662. align="center"
  663. field="deliveryDate"
  664. width="230px"
  665. >
  666. <!-- edit-render -->
  667. <template v-slot:edit="scope">
  668. <el-date-picker
  669. v-model="scope.row.deliveryDate"
  670. :disabled="sonDisable"
  671. clearable
  672. type="date"
  673. :size="size"
  674. value-format="yyyy-MM-dd"
  675. :picker-options="pickerOptionsEnd"
  676. placeholder="选择日期"
  677. >
  678. </el-date-picker>
  679. </template>
  680. </ux-table-column>
  681. <ux-table-column
  682. resizable
  683. title="有效期"
  684. align="center"
  685. field="expiry"
  686. width="100px"
  687. />
  688. <ux-table-column
  689. resizable
  690. title="有效期单位"
  691. align="center"
  692. field="expiryUnit"
  693. width="100px"
  694. />
  695. <!-- <ux-table-column resizable title="安全库存" align="center" field="safeStock" width="100px"/> -->
  696. <ux-table-column
  697. resizable
  698. title="注册人"
  699. align="center"
  700. field="registrant"
  701. width="100px"
  702. />
  703. <!-- <ux-table-column resizable title="预留比例" align="center" field="reservedProportion" width="120px" edit-render>
  704. <template v-slot:edit="scope">
  705. <el-select clearable :disabled="sonDisable" :size="size" v-model="scope.row.reservedProportion" @clear="cleanYLSL(scope)">
  706. <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
  707. </el-option>
  708. </el-select>
  709. </template>
  710. </ux-table-column> -->
  711. <!-- <ux-table-column resizable title="预留周期" align="center" field="reservedPeriod" width="120px" edit-render>
  712. <template v-slot:edit="scope">
  713. <el-input type="number" min="0" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" clearable :disabled="sonDisable" :size="size" v-model="scope.row.reservedPeriod"></el-input>
  714. </template>
  715. </ux-table-column>
  716. <ux-table-column resizable title="预留数量" align="center" field="reservedQty" width="120px" edit-render>
  717. <template v-slot:edit="scope">
  718. <el-input type="number" min="0" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" @input="scope.row.reservedQty=Math.ceil(scope.row.reservedQty)" clearable :disabled="sonDisable" :size="size" v-model="scope.row.reservedQty"></el-input>
  719. </template>
  720. </ux-table-column> -->
  721. <ux-table-column
  722. resizable
  723. title="集团预测分类"
  724. align="center"
  725. field="forecastClassify"
  726. width="120px"
  727. />
  728. <ux-table-column
  729. resizable
  730. title="近一月需求"
  731. align="center"
  732. field="onemonthAvgVolume"
  733. width="100px"
  734. />
  735. <ux-table-column
  736. resizable
  737. title="近三月需求"
  738. align="center"
  739. field="threemonthAvgVolume"
  740. width="100px"
  741. />
  742. <ux-table-column
  743. resizable
  744. title="采购在途"
  745. align="center"
  746. field="puFreight"
  747. width="100px"
  748. />
  749. <ux-table-column
  750. resizable
  751. title="补单标识"
  752. align="center"
  753. field="isReplenishment"
  754. width="100px"
  755. edit-render
  756. >
  757. <template v-slot:edit="scope">
  758. <el-switch
  759. v-model="scope.row.isReplenishment"
  760. disabled
  761. active-value="Y"
  762. inactive-value="N"
  763. active-color="#13ce66"
  764. inactive-color="#a1a3a9"
  765. >
  766. </el-switch>
  767. </template>
  768. <template v-slot="{ row }">{{
  769. row.isReplenishment == "Y" ? "是" : "否"
  770. }}</template>
  771. </ux-table-column>
  772. <ux-table-column
  773. resizable
  774. title="补单供应商"
  775. align="center"
  776. field="additionalSupplierName"
  777. width="200px"
  778. :render-header="anotherRedStar"
  779. edit-render
  780. >
  781. <template v-slot:edit="scope">
  782. <el-input
  783. clearable
  784. :disabled="sonDisable || BDZT"
  785. :size="size"
  786. v-model="scope.row.additionalSupplierName"
  787. @clear="clearHang(scope.rowIndex, '选择补单供应商')"
  788. @paste.native="pasteMe($event, scope, scope.rowIndex)"
  789. >
  790. <el-button
  791. :size="size"
  792. :disabled="sonDisable || BDZT"
  793. slot="append"
  794. icon="el-icon-more"
  795. @click="
  796. chooseDept(
  797. scope.rowIndex,
  798. 'SUPPLIER_PARAM',
  799. true,
  800. '选择补单供应商'
  801. )
  802. "
  803. ></el-button>
  804. </el-input>
  805. </template>
  806. </ux-table-column>
  807. <ux-table-column
  808. resizable
  809. title="末级供应库存组织"
  810. align="center"
  811. field="lastStockOrgName"
  812. width="180px"
  813. ></ux-table-column>
  814. <ux-table-column
  815. resizable
  816. title="末级供应仓库"
  817. align="center"
  818. field="lastWarehouseName"
  819. width="150px"
  820. />
  821. <ux-table-column
  822. resizable
  823. title="末级供应货位"
  824. align="center"
  825. field="lastAllocationName"
  826. width="150px"
  827. />
  828. <ux-table-column
  829. resizable
  830. title="中心仓可用量"
  831. align="center"
  832. field="centralWarehouseQty"
  833. width="120px"
  834. />
  835. <ux-table-column
  836. resizable
  837. title="调拨状态"
  838. align="center"
  839. field="statusAllot"
  840. width="100px"
  841. edit-render
  842. >
  843. <template v-slot:edit="scope">
  844. <el-switch
  845. v-model="scope.row.statusAllot"
  846. :disabled="sonDisable"
  847. active-value="Y"
  848. inactive-value="N"
  849. active-color="#13ce66"
  850. inactive-color="#a1a3a9"
  851. >
  852. </el-switch>
  853. </template>
  854. <template v-slot="{ row }">{{
  855. row.statusAllot == "Y" ? "是" : "否"
  856. }}</template>
  857. </ux-table-column>
  858. <ux-table-column
  859. resizable
  860. title="调拨单号"
  861. align="center"
  862. field="allotCode"
  863. ></ux-table-column>
  864. <ux-table-column
  865. resizable
  866. title="调拨占有量"
  867. align="center"
  868. field="allotQty"
  869. width="100px"
  870. />
  871. <ux-table-column
  872. resizable
  873. title="最终净需求量"
  874. align="center"
  875. field="resDemandQty"
  876. width="120px"
  877. />
  878. <ux-table-column
  879. resizable
  880. title="关闭数量"
  881. align="center"
  882. field="closeQty"
  883. width="80px"
  884. />
  885. <ux-table-column
  886. resizable
  887. title="最终采购执行数量"
  888. align="center"
  889. field="executeQty"
  890. width="150px"
  891. >
  892. <template v-slot:edit="scope">
  893. {{ scope.row.executeQty ? scope.row.executeQty : 0 }}
  894. </template>
  895. </ux-table-column>
  896. <ux-table-column
  897. resizable
  898. title="收货地址"
  899. align="center"
  900. field="deliveryAddressName"
  901. width="200px"
  902. edit-render
  903. >
  904. <template v-slot:edit="scope">
  905. <el-input
  906. clearable
  907. :disabled="sonDisable"
  908. :size="size"
  909. v-model="scope.row.deliveryAddressName"
  910. @clear="clearHang(scope.rowIndex, '选择收货地址')"
  911. @paste.native="pasteMe($event, scope, scope.rowIndex)"
  912. >
  913. <el-button
  914. :size="size"
  915. :disabled="sonDisable"
  916. slot="append"
  917. icon="el-icon-more"
  918. @click="
  919. chooseDept(
  920. scope.rowIndex,
  921. 'ADDRESS_PARAM',
  922. true,
  923. '选择收货地址'
  924. )
  925. "
  926. ></el-button>
  927. </el-input>
  928. </template>
  929. </ux-table-column>
  930. <ux-table-column
  931. resizable
  932. title="联系人"
  933. align="center"
  934. field="contacts"
  935. width="100px"
  936. />
  937. <ux-table-column
  938. resizable
  939. title="联系人电话"
  940. align="center"
  941. field="contactsPhone"
  942. width="150px"
  943. />
  944. <ux-table-column
  945. resizable
  946. title="详细地址"
  947. align="center"
  948. field="address"
  949. width="150px"
  950. />
  951. <ux-table-column
  952. resizable
  953. title="价格类型"
  954. align="center"
  955. field="priceType"
  956. width="120px"
  957. edit-render
  958. >
  959. <template v-slot:edit="scope">
  960. <el-select
  961. clearable
  962. :disabled="sonDisable"
  963. :size="size"
  964. v-model="scope.row.priceType"
  965. >
  966. <el-option
  967. v-for="dict in dict.type.sys_price_type"
  968. :key="dict.value"
  969. :label="dict.label"
  970. :value="dict.value"
  971. >
  972. </el-option>
  973. </el-select>
  974. </template>
  975. <template v-slot="{ row }">{{
  976. row.priceType == "order"
  977. ? "订货价"
  978. : row.priceType == "consignment"
  979. ? "寄售价"
  980. : row.priceType == "adjusted"
  981. ? "调货价"
  982. : ""
  983. }}</template>
  984. </ux-table-column>
  985. <ux-table-column
  986. resizable
  987. title="是否客户指定"
  988. align="center"
  989. field="isCustomerSpecified"
  990. width="120px"
  991. edit-render
  992. >
  993. <template v-slot:edit="scope">
  994. <el-switch
  995. v-model="scope.row.isCustomerSpecified"
  996. disabled
  997. active-value="Y"
  998. inactive-value="N"
  999. active-color="#13ce66"
  1000. inactive-color="#a1a3a9"
  1001. >
  1002. </el-switch>
  1003. </template>
  1004. <template v-slot="{ row }">{{
  1005. row.isCustomerSpecified == "Y" ? "是" : "否"
  1006. }}</template>
  1007. </ux-table-column>
  1008. <!-- <ux-table-column resizable title="批号锁定标识" align="center" field="isBatchLock" width="100px">
  1009. <template v-slot:edit="scope">
  1010. <el-form-item class="hang">
  1011. <el-switch
  1012. v-model="scope.row.isBatchLock"
  1013. :disabled="sonDisable"
  1014. active-value="Y"
  1015. inactive-value="N"
  1016. active-color="#13ce66"
  1017. inactive-color="#a1a3a9">
  1018. </el-switch>
  1019. </el-form-item>
  1020. </template>
  1021. </ux-table-column> -->
  1022. <ux-table-column
  1023. resizable
  1024. title="采购备注"
  1025. align="center"
  1026. field="updateCause"
  1027. width="100px"
  1028. />
  1029. <ux-table-column
  1030. resizable
  1031. title="可用量"
  1032. align="center"
  1033. field="availableQty"
  1034. width="100px"
  1035. />
  1036. <ux-table-column
  1037. fixed="right"
  1038. title="操作"
  1039. width="100px"
  1040. align="center"
  1041. >
  1042. <template slot-scope="scope">
  1043. <el-button
  1044. type="text"
  1045. :size="size"
  1046. :disabled="sonDisable"
  1047. @click="delLine(scope.rowIndex, scope.row)"
  1048. >删除</el-button
  1049. >
  1050. </template>
  1051. </ux-table-column>
  1052. </ux-grid>
  1053. </el-form>
  1054. <div class="btn_group">
  1055. <el-button
  1056. type="primary"
  1057. :size="size"
  1058. @click="jumpOA"
  1059. v-if="
  1060. sonPageStu == 'check' &&
  1061. (row.status == '1' || row.status == '2') &&
  1062. basicForm.flowId
  1063. "
  1064. >流程跳转</el-button
  1065. >
  1066. <el-button
  1067. type="primary"
  1068. :size="size"
  1069. @click="copy"
  1070. v-if="sonPageStu == 'check'"
  1071. >复制</el-button
  1072. >
  1073. <el-button
  1074. type="primary"
  1075. :size="size"
  1076. @click="editPage"
  1077. v-if="sonPageStu == 'check' && row.status == '0'"
  1078. >编辑</el-button
  1079. >
  1080. <el-button
  1081. type="primary"
  1082. :size="size"
  1083. @click="save"
  1084. v-if="sonPageStu == 'add' || sonPageStu == 'edit'"
  1085. >保存</el-button
  1086. >
  1087. <el-button
  1088. type="primary"
  1089. :size="size"
  1090. @click="submit"
  1091. v-if="
  1092. sonPageStu == 'check' && (row.status == '0' || row.status == '3')
  1093. "
  1094. >提交</el-button
  1095. >
  1096. <el-button :size="size" plain @click="back">返回</el-button>
  1097. </div>
  1098. </el-card>
  1099. <Reserved
  1100. v-if="dialog.config"
  1101. :isVisible="dialog.config"
  1102. :info="row"
  1103. @updateReserved="updateReserved"
  1104. />
  1105. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
  1106. <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="false" />
  1107. <!-- 批量调整参数 -->
  1108. <el-dialog
  1109. title="批量调整"
  1110. :visible.sync="adjust.open"
  1111. @close="closeEvent"
  1112. width="38%"
  1113. >
  1114. <el-row style="margin-bottom: 10px">
  1115. <el-col :span="6" class="pltzTxt">默认采购组织</el-col>
  1116. <el-col :span="14">
  1117. <el-input
  1118. class="pltzIpt"
  1119. clearable
  1120. :size="size"
  1121. v-model="adjust.purOrgName"
  1122. @clear="clearHang(0, 'cgzz')"
  1123. @focus="chooseOrg('ORG_PARAM', true, '采购组织')"
  1124. >
  1125. <el-button
  1126. :size="size"
  1127. slot="append"
  1128. icon="el-icon-more"
  1129. @click="chooseOrg('ORG_PARAM', true, '采购组织')"
  1130. ></el-button>
  1131. </el-input>
  1132. </el-col>
  1133. </el-row>
  1134. <el-row style="margin-bottom: 10px">
  1135. <el-col :span="6" class="pltzTxt">价格类型</el-col>
  1136. <el-col :span="14">
  1137. <el-select
  1138. class="pltzIpt"
  1139. clearable
  1140. :size="size"
  1141. v-model="adjust.priceType"
  1142. >
  1143. <el-option
  1144. v-for="dict in dict.type.sys_price_type"
  1145. :key="dict.value"
  1146. :label="dict.label"
  1147. :value="dict.value"
  1148. >
  1149. </el-option>
  1150. </el-select>
  1151. </el-col>
  1152. </el-row>
  1153. <el-row style="margin-bottom: 10px">
  1154. <el-col :span="6" class="pltzTxt">采购员</el-col>
  1155. <el-col :span="14">
  1156. <el-select
  1157. class="pltzIpt"
  1158. clearable
  1159. :size="size"
  1160. v-model="adjust.purchaseMan"
  1161. @focus="chooseOrg('CONTACTS_PARAM', true, '采购员')"
  1162. >
  1163. <el-option
  1164. v-for="item in purchaseManOptions"
  1165. :key="item.id"
  1166. :label="item.name"
  1167. :value="item.code"
  1168. />
  1169. </el-select>
  1170. </el-col>
  1171. </el-row>
  1172. <el-row style="margin-bottom: 10px">
  1173. <el-col :span="6" class="pltzTxt">收货仓库</el-col>
  1174. <el-col :span="14">
  1175. <el-input
  1176. class="pltzIpt"
  1177. clearable
  1178. :size="size"
  1179. v-model="adjust.warehouseName"
  1180. @clear="clearHang(0, 'shck')"
  1181. @focus="
  1182. adjustCangku('WAREHOUSE_PARAM', true, '收货仓库', adjust.puOrg)
  1183. "
  1184. >
  1185. <el-button
  1186. :size="size"
  1187. slot="append"
  1188. icon="el-icon-more"
  1189. @click="
  1190. adjustCangku('WAREHOUSE_PARAM', true, '收货仓库', adjust.puOrg)
  1191. "
  1192. ></el-button>
  1193. </el-input>
  1194. </el-col>
  1195. </el-row>
  1196. <el-row style="margin-bottom: 10px">
  1197. <el-col :span="6" class="pltzTxt">收货货位</el-col>
  1198. <el-col :span="14">
  1199. <el-input
  1200. class="pltzIpt"
  1201. clearable
  1202. :size="size"
  1203. v-model="adjust.allocationName"
  1204. @clear="clearHang(0, 'shhw')"
  1205. @focus="
  1206. adjustHuoWei(
  1207. 'ALLOCATION_PARAM',
  1208. true,
  1209. '收货货位',
  1210. adjust.warehouse
  1211. )
  1212. "
  1213. >
  1214. <el-button
  1215. :size="size"
  1216. slot="append"
  1217. icon="el-icon-more"
  1218. @click="
  1219. adjustHuoWei(
  1220. 'ALLOCATION_PARAM',
  1221. true,
  1222. '收货货位',
  1223. adjust.warehouse
  1224. )
  1225. "
  1226. ></el-button>
  1227. </el-input>
  1228. </el-col>
  1229. </el-row>
  1230. <el-row style="margin-bottom: 10px">
  1231. <el-col :span="6" class="pltzTxt">补单供应商</el-col>
  1232. <el-col :span="14">
  1233. <el-input
  1234. class="pltzIpt"
  1235. clearable
  1236. :disabled="sonDisable || BDZT"
  1237. :size="size"
  1238. @clear="clearHang(0, 'bdgys')"
  1239. v-model="adjust.additionalSupplierName"
  1240. @focus="chooseOrg('SUPPLIER_PARAM', true, '补单供应商')"
  1241. >
  1242. <el-button
  1243. :size="size"
  1244. :disabled="sonDisable || BDZT"
  1245. slot="append"
  1246. icon="el-icon-more"
  1247. @click="chooseOrg('SUPPLIER_PARAM', true, '补单供应商')"
  1248. ></el-button>
  1249. </el-input>
  1250. </el-col>
  1251. </el-row>
  1252. <el-row style="margin-bottom: 10px">
  1253. <el-col :span="6" class="pltzTxt">业务备注</el-col>
  1254. <el-col :span="14">
  1255. <el-input
  1256. class="pltzIpt"
  1257. clearable
  1258. :size="size"
  1259. v-model="adjust.remark"
  1260. />
  1261. </el-col>
  1262. </el-row>
  1263. <el-row style="margin-bottom: 10px">
  1264. <el-col :span="6" class="pltzTxt">收货地址</el-col>
  1265. <el-col :span="14">
  1266. <el-input
  1267. class="pltzIpt"
  1268. clearable
  1269. :size="size"
  1270. @clear="clearHang(0, 'shdz')"
  1271. v-model="adjust.deliveryAddressName"
  1272. >
  1273. <el-button
  1274. :size="size"
  1275. slot="append"
  1276. icon="el-icon-more"
  1277. @click="chooseOrg('ADDRESS_PARAM', true, '收货地址')"
  1278. ></el-button>
  1279. </el-input>
  1280. </el-col>
  1281. </el-row>
  1282. <el-row style="margin-bottom: 10px">
  1283. <el-col :span="6" class="pltzTxt">收货地址编码</el-col>
  1284. <el-col :span="14">
  1285. <el-input
  1286. class="pltzIpt"
  1287. disabled
  1288. clearable
  1289. :size="size"
  1290. v-model="adjust.deliveryAddress"
  1291. />
  1292. </el-col>
  1293. </el-row>
  1294. <el-row style="margin-bottom: 10px">
  1295. <el-col :span="6" class="pltzTxt">联系人</el-col>
  1296. <el-col :span="14">
  1297. <el-input
  1298. class="pltzIpt"
  1299. disabled
  1300. clearable
  1301. :size="size"
  1302. v-model="adjust.contacts"
  1303. />
  1304. </el-col>
  1305. </el-row>
  1306. <el-row style="margin-bottom: 10px">
  1307. <el-col :span="6" class="pltzTxt">联系人电话</el-col>
  1308. <el-col :span="14">
  1309. <el-input
  1310. class="pltzIpt"
  1311. disabled
  1312. clearable
  1313. :size="size"
  1314. v-model="adjust.contactsPhone"
  1315. />
  1316. </el-col>
  1317. </el-row>
  1318. <el-row style="margin-bottom: 10px">
  1319. <el-col :span="6" class="pltzTxt">详细地址</el-col>
  1320. <el-col :span="14">
  1321. <el-input
  1322. class="pltzIpt"
  1323. disabled
  1324. clearable
  1325. :size="size"
  1326. v-model="adjust.address"
  1327. />
  1328. </el-col>
  1329. </el-row>
  1330. <div slot="footer">
  1331. <el-button :size="size" type="primary" @click="confirmAdjust"
  1332. >确 认</el-button
  1333. >
  1334. <el-button :size="size" @click="adjust.open = false">取 消</el-button>
  1335. </div>
  1336. </el-dialog>
  1337. </div>
  1338. </template>
  1339. <script>
  1340. import {
  1341. addDemand,
  1342. getDemandDetail,
  1343. getDemandSonDetail,
  1344. editDemand,
  1345. submitDemand,
  1346. queryMan,
  1347. toOA,
  1348. confirmSubmit,
  1349. SetdemandDate,
  1350. } from "@/api/purchase/purchaseDemand.js";
  1351. // 用于回显参照框数据
  1352. import { getRefer } from "@/api/purchase/basic.js";
  1353. import ElTableInfiniteScroll from "el-table-infinite-scroll";
  1354. import "regenerator-runtime/runtime";
  1355. export default {
  1356. directives: {
  1357. "el-table-infinite-scroll": ElTableInfiniteScroll,
  1358. },
  1359. name: "addDemandList",
  1360. props: ["pageStu", "row", "disable"],
  1361. dicts: [
  1362. "sys_yes_no",
  1363. "sys_processing_mode",
  1364. "sys_plan_type",
  1365. "sys_status",
  1366. "sys_bill_source",
  1367. "sys_business",
  1368. "sys_reserve_ratio",
  1369. "sys_period_unit",
  1370. "sys_price_type",
  1371. ],
  1372. components: {
  1373. Reserved: () => import("./reserved/index.vue"),
  1374. Refers: () => import("@/components/Refers/refers.vue"),
  1375. popDialog: () => import("@/components/PopDialog/index.vue"),
  1376. },
  1377. model: {
  1378. prop: "isList",
  1379. event: "jugislist",
  1380. },
  1381. data() {
  1382. return {
  1383. size: "mini",
  1384. loading: true,
  1385. // 不能直接改变props传来的值
  1386. sonPageStu: this.pageStu,
  1387. sonDisable: this.disable,
  1388. // BDZT是补单供应商是否可以编辑条件
  1389. BDZT: true,
  1390. dialog: {
  1391. config: false,
  1392. },
  1393. basicForm: {
  1394. code: "",
  1395. org: "",
  1396. orgName: "",
  1397. demandBusinessType: "1",
  1398. status: "0",
  1399. customer: "",
  1400. customerName: "",
  1401. customerCode: "",
  1402. customerPrincipal: "",
  1403. demandPersonal: "",
  1404. demandPersonalName: "",
  1405. demandDept: "",
  1406. demandDeptName: "",
  1407. planType: "ZJH",
  1408. demandDate: "",
  1409. source: "4",
  1410. isBeyondRap: "",
  1411. billType: "ZQBH",
  1412. isCustomerSpecified: "N",
  1413. isProcess: "",
  1414. isMonthleyCalculate: "",
  1415. createTime: this.parseTime(new Date().getTime()),
  1416. remark: "",
  1417. puDemandItemList: [],
  1418. },
  1419. delDemandItemList: [],
  1420. basicRules: {},
  1421. tableList: [],
  1422. referCondition: {
  1423. type: "",
  1424. isPage: true,
  1425. title: "",
  1426. },
  1427. // referCondition: {
  1428. // type: '',
  1429. // isPage: true,
  1430. // title: '',
  1431. // },
  1432. tableIndex: null,
  1433. ids: [],
  1434. orgOptions: [],
  1435. manOptions: [],
  1436. personOptions: [],
  1437. deptOptions: [],
  1438. customerOptions: [],
  1439. pickerOptionsEnd: {
  1440. disabledDate: (time) => {
  1441. return (
  1442. time.getTime() <
  1443. new Date(this.basicForm.demandDate).getTime() - 8.64e7
  1444. );
  1445. },
  1446. },
  1447. isBDXQ: false,
  1448. isYl: false,
  1449. // 批量调整参数
  1450. adjust: {
  1451. open: false,
  1452. puOrg: "",
  1453. purOrgName: "",
  1454. priceType: "",
  1455. purchaseMan: "",
  1456. purchaseManName: "",
  1457. warehouse: "",
  1458. warehouseName: "",
  1459. csFlag: "",
  1460. allocation: "",
  1461. allocationName: "",
  1462. additionalSupplier: "",
  1463. additionalSupplierName: "",
  1464. remark: "",
  1465. deliveryAddress: "",
  1466. deliveryAddressName: "",
  1467. contacts: "",
  1468. contactsPhone: "",
  1469. address: "",
  1470. },
  1471. purchaseManOptions: [],
  1472. sonModel: {
  1473. rowNo: null,
  1474. contacts: null,
  1475. id: null,
  1476. demandId: null,
  1477. status: null,
  1478. materialCategory: null,
  1479. buyer: null,
  1480. buyerName: null,
  1481. mateiralClassifyOne: null,
  1482. materialClassifyOneName: null,
  1483. materialClassifyTwo: null,
  1484. materialClassifyTwoName: null,
  1485. materialClassifyThree: null,
  1486. materialClassifyThreeName: null,
  1487. materialClassifyFour: null,
  1488. materialClassifyFourName: null,
  1489. materialCode: null,
  1490. material: null,
  1491. materialName: null,
  1492. classifyId: null,
  1493. specification: null,
  1494. unit: null,
  1495. unitName: null,
  1496. manufacturerName: null,
  1497. registrant: null,
  1498. puPeriod: null,
  1499. expiryUnit: null,
  1500. expiry: null,
  1501. minPackage: null,
  1502. minOrderQty: null,
  1503. minBatch: null,
  1504. safeStock: null,
  1505. averageQtyMonth: null,
  1506. qty: null,
  1507. adjustmentPersonal: null,
  1508. adjustmentTime: null,
  1509. manualRegulation: null,
  1510. updateCause: null,
  1511. reservedProportion: null,
  1512. reservedPeriod: null,
  1513. reservedQty: null,
  1514. demandPeriod: null,
  1515. forecastClassify: null,
  1516. onemonthAvgVolume: null,
  1517. threemonthAvgVolume: null,
  1518. puFreight: null,
  1519. deliveryDate: null,
  1520. isUrgency: "N",
  1521. isReplenishment: "N",
  1522. isBatchLock: "N",
  1523. isCustomerSpecified: "",
  1524. remark: null,
  1525. puRemark: null,
  1526. lastWarehouseQty: null,
  1527. resDemandQty: null,
  1528. lastWarehouse: null,
  1529. lastWarehouseName: null,
  1530. deliveryWarehouse: null,
  1531. deliveryWarehouseName: null,
  1532. lastAllocation: null,
  1533. lastAllocationName: null,
  1534. deliveryAllocation: null,
  1535. deliveryAllocationName: null,
  1536. passageOn: null,
  1537. puOrg: null,
  1538. purOrgName: null,
  1539. lastStockQty: null,
  1540. superiorCenterQty: null,
  1541. superiorAllotQty: null,
  1542. availableQty: null,
  1543. statusAllot: "N",
  1544. additionalSupplier: null,
  1545. additionalSupplierName: null,
  1546. periodUnit: null,
  1547. demandCustomer: null,
  1548. demandCustomerName: null,
  1549. lastStockOrg: null,
  1550. lastStockOrgName: null,
  1551. superiorStockOrg: null,
  1552. superiorStockOrgName: null,
  1553. allotCode: null,
  1554. deliveryAddress: null,
  1555. deliveryAddressName: null,
  1556. contacts: null,
  1557. contactsPhone: null,
  1558. address: null,
  1559. source: null,
  1560. priceType: "order",
  1561. puManagerApprover: null,
  1562. puManagerApproverName: null,
  1563. processTime: null,
  1564. affirmer: null,
  1565. tenantId: null,
  1566. revision: null,
  1567. createBy: null,
  1568. createByName: null,
  1569. createTime: null,
  1570. updateBy: null,
  1571. updateByName: null,
  1572. updateTime: null,
  1573. delFlag: 0,
  1574. csFlag: "N",
  1575. // 新增字段
  1576. model: null,
  1577. storageCondition: null,
  1578. transportationCondition: null,
  1579. },
  1580. // 无限滚动配置
  1581. loadDisabled: true,
  1582. page: 0,
  1583. total: 5,
  1584. // 表格校验规则
  1585. tableRules: {
  1586. materialCode: [{ required: true, message: "物料编码必填" }],
  1587. qty: [{ required: true, message: "实际业务需求量必填" }],
  1588. },
  1589. };
  1590. },
  1591. watch: {
  1592. // "basicForm.demandDate": {
  1593. // handler(nVal, oVal) {
  1594. // if (nVal && nVal !== "") {
  1595. // 交货日期=需求日期+采购周期+2 且不允许修改
  1596. // let { puDemandItemList } = this.basicForm;
  1597. // this.basicForm.puDemandItemList = puDemandItemList.map((item) => {
  1598. // let deliveryDate = new Date(
  1599. // new Date(nVal).setDate(
  1600. // new Date(nVal).getDate() + Number(item.puPeriod) + 2
  1601. // )
  1602. // ).Format("yyyy-MM-dd");
  1603. // return {
  1604. // ...item,
  1605. // deliveryDate,
  1606. // };
  1607. // });
  1608. // }
  1609. // },
  1610. // },
  1611. },
  1612. created() {
  1613. if (this.pageStu == "check") {
  1614. this.getDetails(this.row);
  1615. } else if (this.pageStu == "edit") {
  1616. this.getDetails(this.row);
  1617. } else if (this.pageStu == "add") {
  1618. // 新增时判断需求日期
  1619. this.dafaultDate();
  1620. this.loading = false;
  1621. this.basicForm.demandPersonal = this.$store.state.user.name;
  1622. this.basicForm.demandPersonalName = this.$store.state.user.nickName;
  1623. this.basicForm.demandDept = this.$store.state.user.deptId;
  1624. this.basicForm.demandDeptName = this.$store.state.user.deptName;
  1625. if (this.basicForm.demandPersonal) {
  1626. this.reBackRefer(
  1627. "CONTACTS_PARAM",
  1628. this.basicForm.demandPersonal,
  1629. "需求人员"
  1630. );
  1631. }
  1632. if (this.basicForm.demandDept) {
  1633. this.reBackRefer("DEPT_PARAM", this.basicForm.demandDept);
  1634. }
  1635. }
  1636. },
  1637. methods: {
  1638. // 默认需求日期根据当天星期几判断
  1639. async dafaultDate() {
  1640. try {
  1641. let { planType, demandDate } = this.basicForm;
  1642. console.log();
  1643. let { code, data } = await SetdemandDate({ planType });
  1644. if (code == 200) {
  1645. this.basicForm.demandDate = new Date(data).Format("yyyy-MM-dd");
  1646. }
  1647. } catch (error) {}
  1648. // // 获取当前时间
  1649. // let today = new Date().Format("yyyy-MM-dd");
  1650. // // //获取当前时间的年份转为字符串
  1651. // // let year = date.getFullYear().toString();
  1652. // // //获取月份,由于月份从0开始,此处要加1,判断是否小于10,如果是在字符串前面拼接'0'
  1653. // // let month =
  1654. // // date.getMonth() + 1 < 10
  1655. // // ? "0" + (date.getMonth() + 1).toString()
  1656. // // : (date.getMonth() + 1).toString(); //'04'
  1657. // // //获取天,判断是否小于10,如果是在字符串前面拼接'0'
  1658. // // let da =
  1659. // // date.getDate() < 10
  1660. // // ? "0" + date.getDate().toString()
  1661. // // : date.getDate().toString(); //'12'
  1662. // // let today = year + "-" + month + "-" + da;
  1663. // // console.log("今天日期", today);
  1664. // let weekDay = new Date(today).getDay();
  1665. // // 改变需求计划的判断写这里面了
  1666. // if (this.basicForm.planType == "JJXQ") {
  1667. // this.basicForm.demandDate = today;
  1668. // } else {
  1669. // if (weekDay == 0) {
  1670. // this.basicForm.demandDate = this.getNextDate(today, 2);
  1671. // } else if (weekDay == 1) {
  1672. // this.basicForm.demandDate = this.getNextDate(today, 1);
  1673. // } else if (weekDay == 2) {
  1674. // this.basicForm.demandDate = today;
  1675. // } else if (weekDay == 3) {
  1676. // this.basicForm.demandDate = this.getNextDate(today, 6);
  1677. // } else if (weekDay == 4) {
  1678. // this.basicForm.demandDate = this.getNextDate(today, 5);
  1679. // } else if (weekDay == 5) {
  1680. // this.basicForm.demandDate = this.getNextDate(today, 4);
  1681. // } else if (weekDay == 6) {
  1682. // this.basicForm.demandDate = this.getNextDate(today, 3);
  1683. // }
  1684. // // console.log(this.getNextDate(today, 2))
  1685. // }
  1686. },
  1687. // 获取某天日期的下一天,默认为第二天 默认输出格式为yyyy-mm-dd
  1688. // getNextDate(date, day = 1, format = "{y}-{m}-{d}") {
  1689. // if (date) {
  1690. // date = date.match(/\d+/g).join("-"); // 格式为2022年09月19日处理
  1691. // const nDate = new Date(date);
  1692. // nDate.setDate(nDate.getDate() + day);
  1693. // const formatObj = {
  1694. // y: nDate.getFullYear(),
  1695. // m: nDate.getMonth() + 1,
  1696. // d: nDate.getDate(),
  1697. // };
  1698. // return format.replace(/{([ymd])+}/g, (result, key) => {
  1699. // const value = formatObj[key];
  1700. // return value.toString().padStart(2, "0");
  1701. // });
  1702. // } else {
  1703. // console.log("date格式不正确");
  1704. // }
  1705. // },
  1706. // 改变需求计划改变需求日期
  1707. changeplanType(val) {
  1708. this.dafaultDate();
  1709. console.log(val);
  1710. if (val == "JJXQ") {
  1711. this.basicForm.billType = "JJXQ";
  1712. } else {
  1713. if (this.basicForm.billType == "JJXQ") {
  1714. this.basicForm.billType = "";
  1715. }
  1716. }
  1717. if (val == "JJXQ" && this.basicForm.puDemandItemList.length != 0) {
  1718. this.basicForm.puDemandItemList.forEach((item) => {
  1719. item.isUrgency = "Y";
  1720. });
  1721. } else {
  1722. this.basicForm.puDemandItemList.forEach((item) => {
  1723. item.isUrgency = "N";
  1724. });
  1725. }
  1726. },
  1727. // 无限滚动加载配置
  1728. load() {
  1729. if (this.loadDisabled) return;
  1730. this.page++;
  1731. if (this.page <= this.total) {
  1732. this.basicForm.puDemandItemList =
  1733. this.basicForm.puDemandItemList.concat(
  1734. this.basicForm.puDemandItemList
  1735. );
  1736. }
  1737. if (this.page === this.total) {
  1738. this.loadDisabled = true;
  1739. }
  1740. },
  1741. // 改变单据日期时清空子表的调拨日期
  1742. changeDemandDate() {
  1743. this.basicForm.puDemandItemList.forEach((item) => {
  1744. item.deliveryDate = null;
  1745. });
  1746. },
  1747. // 更改业务类型调整明细行内补单或紧急标识
  1748. changeBillType(val) {
  1749. if (val == "BDXQ" && this.basicForm.puDemandItemList.length != 0) {
  1750. this.isBDXQ = true;
  1751. this.BDZT = false;
  1752. this.basicForm.puDemandItemList.forEach((item) => {
  1753. item.isReplenishment = "Y";
  1754. });
  1755. } else {
  1756. this.isBDXQ = false;
  1757. this.BDZT = true;
  1758. this.basicForm.puDemandItemList.forEach((item) => {
  1759. item.isReplenishment = "N";
  1760. item.additionalSupplier = null;
  1761. item.additionalSupplierName = null;
  1762. });
  1763. }
  1764. if (val == "JJXQ") {
  1765. this.basicForm.planType = "JJXQ";
  1766. // 判断需求日期
  1767. this.dafaultDate();
  1768. } else {
  1769. if (this.basicForm.planType == "JJXQ") {
  1770. this.basicForm.planType = "";
  1771. }
  1772. }
  1773. if (val == "JJXQ" && this.basicForm.puDemandItemList.length != 0) {
  1774. this.basicForm.puDemandItemList.forEach((item) => {
  1775. item.isUrgency = "Y";
  1776. });
  1777. } else {
  1778. this.basicForm.puDemandItemList.forEach((item) => {
  1779. item.isUrgency = "N";
  1780. });
  1781. }
  1782. },
  1783. // 改变是否客户指定
  1784. isCustomer() {
  1785. if (
  1786. this.basicForm.isCustomerSpecified == "Y" &&
  1787. this.basicForm.puDemandItemList.length != 0
  1788. ) {
  1789. this.basicForm.puDemandItemList.forEach((item) => {
  1790. item.isCustomerSpecified = "Y";
  1791. });
  1792. } else {
  1793. this.basicForm.puDemandItemList.forEach((item) => {
  1794. item.isCustomerSpecified = "N";
  1795. });
  1796. }
  1797. },
  1798. hangStatus(row) {
  1799. switch (row.row.status) {
  1800. case "0":
  1801. return "需补货";
  1802. case "1":
  1803. return "待计划确认";
  1804. case "2":
  1805. return "计划已确认";
  1806. case "3":
  1807. return "计划已审核";
  1808. case "4":
  1809. return "行关闭";
  1810. case "5":
  1811. return "总供应可满足";
  1812. }
  1813. },
  1814. // 清空
  1815. cleanYLSL(scope) {
  1816. scope.row.reservedQty = "";
  1817. scope.row.reservedPeriod = "";
  1818. },
  1819. copy() {
  1820. this.$modal.notifySuccess("复制成功");
  1821. this.sonPageStu = "add";
  1822. this.sonDisable = false;
  1823. // this.getDetails(this.row)
  1824. this.basicForm.id = "";
  1825. this.basicForm.code = "";
  1826. this.basicForm.createBy = "";
  1827. this.basicForm.source = "4";
  1828. this.basicForm.isCustomerSpecified = "N";
  1829. this.basicForm.flowId = "";
  1830. this.basicForm.demandPersonal = this.$store.state.user.name;
  1831. this.basicForm.demandPersonalName = this.$store.state.user.nickName;
  1832. this.basicForm.demandDept = this.$store.state.user.deptId;
  1833. this.basicForm.demandDeptName = this.$store.state.user.deptName;
  1834. // 复制时判断需求日期
  1835. this.dafaultDate();
  1836. if (this.basicForm.demandPersonal) {
  1837. this.reBackRefer(
  1838. "CONTACTS_PARAM",
  1839. this.basicForm.demandPersonal,
  1840. "需求人员"
  1841. );
  1842. }
  1843. if (this.basicForm.demandDept) {
  1844. this.reBackRefer("DEPT_PARAM", this.basicForm.demandDept);
  1845. }
  1846. this.basicForm.puDemandItemList.forEach((item) => {
  1847. item.status = "";
  1848. item.buyerName = "";
  1849. item.buyer = "";
  1850. item.reservedProportion = "";
  1851. item.reservedPeriod = "";
  1852. item.reservedQty = "";
  1853. item.averageQtyMonth = "";
  1854. item.demandPeriod = "";
  1855. item.forecastClassify = "";
  1856. item.onemonthAvgVolume = "";
  1857. item.threemonthAvgVolume = "";
  1858. item.puFreight = "";
  1859. item.superiorAllotQty = "";
  1860. item.resDemandQty = "";
  1861. item.executeQty = "";
  1862. item.deliveryWarehouseName = "";
  1863. item.deliveryWarehouse = "";
  1864. item.deliveryAllocationName = "";
  1865. item.deliveryAllocation = "";
  1866. item.lastWarehouseName = "";
  1867. item.lastAllocationName = "";
  1868. item.availableQty = "";
  1869. item.lastStockOrgName = "";
  1870. item.centralWarehouseQty = "";
  1871. item.allotCode = "";
  1872. item.allotQty = "";
  1873. item.deliveryAddress = "";
  1874. item.deliveryAddressName = "";
  1875. item.contacts = "";
  1876. item.contactsPhone = "";
  1877. item.address = "";
  1878. item.statusAllot = "N";
  1879. });
  1880. this.dafaultDate();
  1881. },
  1882. editPage() {
  1883. this.sonPageStu = "edit";
  1884. this.sonDisable = false;
  1885. },
  1886. handleData() {
  1887. // 复制新增把id,需求单号,创建人置为空,子表去掉id
  1888. this.basicForm.id = "";
  1889. this.basicForm.code = "";
  1890. this.basicForm.createBy = "";
  1891. this.basicForm.source = "4";
  1892. if (this.basicForm.puDemandItemList.length !== 0) {
  1893. this.basicForm.puDemandItemList.forEach((item) => {
  1894. if (item.id) {
  1895. delete item.id;
  1896. }
  1897. if (item.demandId) {
  1898. delete item.demandId;
  1899. }
  1900. if (item.allotCode) {
  1901. delete item.allotCode;
  1902. }
  1903. });
  1904. }
  1905. },
  1906. async save() {
  1907. if (this.basicForm.puDemandItemList.length !== 0) {
  1908. this.$refs["basic"].validate((valid, obj) => {
  1909. if (valid) {
  1910. // 加上表格校验
  1911. this.$refs.table.fullValidate().then((data) => {
  1912. if (!data) {
  1913. this.$modal.loading("保存中...");
  1914. if (this.sonPageStu == "add") {
  1915. this.handleData();
  1916. addDemand(this.basicForm)
  1917. .then((res) => {
  1918. if (res.code === 200) {
  1919. this.$modal.notifySuccess(res.msg);
  1920. this.$modal.closeLoading();
  1921. this.back();
  1922. }
  1923. })
  1924. .catch((err) => {
  1925. // 加入定时器防止报错关不掉遮罩
  1926. setTimeout(() => {
  1927. let errorList = JSON.parse(err.message).rowList;
  1928. console.log(errorList);
  1929. this.gainRed(errorList);
  1930. }, 500);
  1931. this.$modal.closeLoading();
  1932. });
  1933. } else if (this.sonPageStu == "edit") {
  1934. let list = [];
  1935. list.push(
  1936. ...this.basicForm.puDemandItemList,
  1937. ...this.delDemandItemList
  1938. );
  1939. // 深拷贝一下参数对象
  1940. let param = JSON.parse(JSON.stringify(this.basicForm));
  1941. param.puDemandItemList = list;
  1942. // this.basicForm.puDemandItemList.push(...this.delDemandItemList)
  1943. editDemand(param)
  1944. .then((res) => {
  1945. if (res.code === 200) {
  1946. this.$modal.notifySuccess(res.msg);
  1947. this.$modal.closeLoading();
  1948. this.back();
  1949. }
  1950. })
  1951. .catch((err) => {
  1952. // 加入定时器防止报错关不掉遮罩
  1953. setTimeout(() => {
  1954. let errorList = JSON.parse(err.message).rowList;
  1955. // console.log(errorList)
  1956. this.gainRed(errorList);
  1957. }, 500);
  1958. this.$modal.closeLoading();
  1959. });
  1960. }
  1961. } else {
  1962. let masStr = "";
  1963. Object.values(data).forEach((errList) => {
  1964. // 将子表下标加入进入标识字段
  1965. this.basicForm.puDemandItemList.forEach((item, index) => {
  1966. item.rightIndex = index;
  1967. });
  1968. console.log("所有列表", this.basicForm.puDemandItemList);
  1969. // 将校验未通过的项与整个表格数据进行过滤对比,得出校验通过的数据
  1970. let rightList = this.basicForm.puDemandItemList.filter(
  1971. (item, index) => {
  1972. return errList.find((item2) => {
  1973. return item2.rowIndex !== item.rightIndex;
  1974. });
  1975. }
  1976. );
  1977. rightList.forEach((items) => {
  1978. if (
  1979. this.$refs.table.$el.querySelector(
  1980. `.elx-body--row:nth-of-type(${items.rightIndex + 1})`
  1981. )
  1982. ) {
  1983. this.$refs.table.$el.querySelector(
  1984. `.elx-body--row:nth-of-type(${items.rightIndex + 1})`
  1985. ).style.background = "";
  1986. }
  1987. });
  1988. errList.forEach((params) => {
  1989. let { rowIndex, column, rules } = params;
  1990. rules.forEach((rule) => {
  1991. masStr += `第 ${rowIndex + 1} 行${rule.message};`;
  1992. });
  1993. if (
  1994. this.$refs.table.$el.querySelector(
  1995. `.elx-body--row:nth-of-type(${rowIndex + 1})`
  1996. )
  1997. ) {
  1998. this.$refs.table.$el.querySelector(
  1999. `.elx-body--row:nth-of-type(${rowIndex + 1})`
  2000. ).style.background = "#f34b4bb8";
  2001. }
  2002. });
  2003. });
  2004. this.$modal.notifyError(masStr);
  2005. }
  2006. });
  2007. } else {
  2008. // 校验加弹窗
  2009. const jiaoyan = [];
  2010. for (let key in obj) {
  2011. jiaoyan.push(obj[key][0].message);
  2012. }
  2013. this.$modal.notifyWarning(jiaoyan[0]);
  2014. return false;
  2015. }
  2016. });
  2017. } else {
  2018. this.$modal.notifyWarning("明细信息不能为空!");
  2019. }
  2020. },
  2021. // 后端校验标红方法
  2022. gainRed(errList) {
  2023. // 将子表下标加入进入标识字段
  2024. this.basicForm.puDemandItemList.forEach((item, index) => {
  2025. item.rightIndex = index;
  2026. });
  2027. console.log("所有列表", this.basicForm.puDemandItemList);
  2028. // 将校验未通过的项与整个表格数据进行过滤对比,得出校验通过的数据
  2029. let rightList = this.basicForm.puDemandItemList.filter((item, index) => {
  2030. return errList.find((item2) => {
  2031. return item2.rowIndex !== item.rightIndex;
  2032. });
  2033. });
  2034. rightList.forEach((items) => {
  2035. if (
  2036. this.$refs.table.$el.querySelector(
  2037. `.elx-body--row:nth-of-type(${items.rightIndex + 1})`
  2038. )
  2039. ) {
  2040. this.$refs.table.$el.querySelector(
  2041. `.elx-body--row:nth-of-type(${items.rightIndex + 1})`
  2042. ).style.background = "";
  2043. }
  2044. });
  2045. errList.forEach((item) => {
  2046. if (
  2047. this.$refs.table.$el.querySelector(
  2048. `.elx-body--row:nth-of-type(${item / 10})`
  2049. )
  2050. ) {
  2051. this.$refs.table.$el.querySelector(
  2052. `.elx-body--row:nth-of-type(${item / 10})`
  2053. ).style.background = "#f34b4bb8";
  2054. }
  2055. });
  2056. },
  2057. submit() {
  2058. this.$modal.loading("提交中...");
  2059. submitDemand(this.basicForm)
  2060. .then((res) => {
  2061. if (res.code === 200) {
  2062. this.$modal.notifySuccess("提交成功");
  2063. this.$modal.closeLoading();
  2064. this.back();
  2065. }
  2066. if (res.code === 233) {
  2067. this.$modal
  2068. .confirm(res.msg)
  2069. .then(function () {
  2070. // 确认
  2071. })
  2072. .then(() => {
  2073. confirmSubmit(this.basicForm)
  2074. .then((res) => {
  2075. if (res.code === 200) {
  2076. this.$modal.notifySuccess("提交成功");
  2077. this.$modal.closeLoading();
  2078. this.back();
  2079. }
  2080. })
  2081. .catch((err) => {
  2082. this.$modal.closeLoading();
  2083. });
  2084. // 取消
  2085. })
  2086. .catch(() => {
  2087. this.$modal.closeLoading();
  2088. });
  2089. this.$modal.closeLoading();
  2090. }
  2091. })
  2092. .catch((err) => {
  2093. // 加入定时器防止报错关不掉遮罩
  2094. setTimeout(() => {
  2095. let errorList = JSON.parse(err.message).rowList;
  2096. console.log(errorList);
  2097. this.gainRed(errorList);
  2098. }, 500);
  2099. this.$modal.closeLoading();
  2100. });
  2101. },
  2102. // 增行
  2103. addLine() {
  2104. const newLine = { ...this.sonModel };
  2105. newLine.isUrgency = this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2106. newLine.isReplenishment = this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2107. newLine.demandCustomer = this.basicForm.customer;
  2108. newLine.demandCustomerName = this.basicForm.customerName;
  2109. this.basicForm.puDemandItemList.push(newLine);
  2110. // 补单需求状态改变
  2111. if (this.basicForm.billType == "BDXQ") {
  2112. this.BDZT = false;
  2113. } else {
  2114. this.BDZT = true;
  2115. }
  2116. },
  2117. delLine(index, row) {
  2118. row.delFlag = "2";
  2119. let delList = [];
  2120. delList = this.basicForm.puDemandItemList.filter((item) => {
  2121. return item.delFlag == "2";
  2122. });
  2123. this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.filter(
  2124. (item) => {
  2125. return item.delFlag == "0";
  2126. }
  2127. );
  2128. this.delDemandItemList.push(...delList);
  2129. console.log("删除的数组", this.delDemandItemList);
  2130. },
  2131. // 批量删除行
  2132. delLines() {
  2133. let delArr = this.$refs.table.getCheckboxRecords();
  2134. if (delArr.length !== 0) {
  2135. delArr.forEach((item) => {
  2136. item.delFlag = "2";
  2137. });
  2138. let delList = [];
  2139. delList = this.basicForm.puDemandItemList.filter((item) => {
  2140. return item.delFlag == "2";
  2141. });
  2142. this.basicForm.puDemandItemList =
  2143. this.basicForm.puDemandItemList.filter((item) => {
  2144. return item.delFlag == "0";
  2145. });
  2146. this.delDemandItemList.push(...delList);
  2147. } else {
  2148. this.$modal.notifyWarning("请至少选择一条明细!");
  2149. }
  2150. },
  2151. back() {
  2152. this.$emit("jugislist", true);
  2153. this.$emit("refresh");
  2154. },
  2155. // 如果需要回显则调用详情接口
  2156. getDetails(row) {
  2157. getDemandDetail(row.id).then((res) => {
  2158. if (res.code === 200) {
  2159. // this.basicForm = res.data
  2160. let reciveForm = res.data;
  2161. let params = { ...{ id: row.id }, ...{ pageNum: 1, pageSize: 10 } };
  2162. getDemandSonDetail(params)
  2163. .then((res) => {
  2164. if (res.code === 200) {
  2165. reciveForm.puDemandItemList = res.data;
  2166. console.log("reciveForm", reciveForm);
  2167. this.basicForm = reciveForm;
  2168. if (this.basicForm.org) {
  2169. this.reBackRefer("ORG_PARAM", this.basicForm.org);
  2170. }
  2171. if (this.basicForm.customer) {
  2172. this.reBackRefer("CUSTOMER_PARAM", this.basicForm.customer);
  2173. }
  2174. if (this.basicForm.customerPrincipal) {
  2175. this.reBackRefer(
  2176. "CONTACTS_PARAM",
  2177. this.basicForm.customerPrincipal,
  2178. "客户负责人"
  2179. );
  2180. }
  2181. if (this.basicForm.demandPersonal) {
  2182. this.reBackRefer(
  2183. "CONTACTS_PARAM",
  2184. this.basicForm.demandPersonal,
  2185. "需求人员"
  2186. );
  2187. }
  2188. if (this.basicForm.demandDept) {
  2189. this.reBackRefer("DEPT_PARAM", this.basicForm.demandDept);
  2190. }
  2191. // 详情时将收货仓库id赋值给stordocId
  2192. // 如果业务类型为补单需求,则明细内补单供应商编码可以编辑
  2193. if (this.basicForm.billType == "BDXQ") {
  2194. this.BDZT = false;
  2195. this.isBDXQ = true;
  2196. } else {
  2197. this.BDZT = true;
  2198. this.isBDXQ = false;
  2199. }
  2200. }
  2201. })
  2202. .then(() => {
  2203. this.loading = false;
  2204. this.dafaultDate();
  2205. })
  2206. .catch((err) => {
  2207. this.loading = false;
  2208. });
  2209. }
  2210. });
  2211. },
  2212. // 单元格标红
  2213. cellClassName({ row, column, rowIndex, columnIndex }) {
  2214. if (
  2215. this.basicForm.isCustomerSpecified == "N" &&
  2216. column.title == "需求可用周期" &&
  2217. Number(row.demandPeriod) > 1.5 &&
  2218. Number(row.qty) > Number(row.minOrderQty)
  2219. ) {
  2220. return "success-row";
  2221. }
  2222. },
  2223. handleSelectionChange(selection) {
  2224. this.ids = selection.map((item) => {
  2225. return item.id;
  2226. });
  2227. console.log("选中数组", this.ids);
  2228. },
  2229. rowSelect(row) {
  2230. this.$refs.table.toggleRowSelection(row);
  2231. },
  2232. // 点击预留单展示
  2233. showReserved() {
  2234. this.dialog.config = true;
  2235. },
  2236. // 修改是否让页面显示与隐藏的事件
  2237. updateReserved(val) {
  2238. this.dialog.config = val;
  2239. },
  2240. // 回显参照框
  2241. reBackRefer(type, id, title) {
  2242. getRefer({ type: type, id: id }).then((res) => {
  2243. if (type == "ORG_PARAM") {
  2244. this.orgOptions = res.rows;
  2245. }
  2246. if (type == "CUSTOMER_PARAM") {
  2247. this.customerOptions = res.rows;
  2248. }
  2249. if (type == "CONTACTS_PARAM" && title == "需求人员") {
  2250. this.personOptions = res.rows;
  2251. }
  2252. if (type == "CONTACTS_PARAM" && title == "客户负责人") {
  2253. this.manOptions = res.rows;
  2254. }
  2255. if (type == "DEPT_PARAM") {
  2256. this.deptOptions = res.rows;
  2257. }
  2258. });
  2259. },
  2260. chooseOrg(type, isPage, title) {
  2261. this.referCondition.type = type;
  2262. this.referCondition.isPage = isPage;
  2263. this.referCondition.title = title;
  2264. this.$refs.refer.init(this.referCondition);
  2265. },
  2266. selectionsToInput(selection) {
  2267. if (
  2268. this.referCondition.type == "ORG_PARAM" &&
  2269. this.referCondition.title == "选择组织"
  2270. ) {
  2271. this.orgOptions = selection;
  2272. this.basicForm.org = selection[0].id;
  2273. this.basicForm.orgName = selection[0].name;
  2274. }
  2275. if (
  2276. this.referCondition.type == "CUSTOMER_PARAM" &&
  2277. this.referCondition.title == "选择客户"
  2278. ) {
  2279. this.customerOptions = selection;
  2280. this.basicForm.customer = selection[0].id;
  2281. this.basicForm.customerName = selection[0].name;
  2282. this.basicForm.customerCode = selection[0].code;
  2283. if (this.basicForm.puDemandItemList.length !== 0) {
  2284. this.basicForm.puDemandItemList.forEach((item) => {
  2285. item.demandCustomerName = this.basicForm.customerName;
  2286. item.demandCustomer = this.basicForm.customer;
  2287. item.status = "";
  2288. item.buyerName = "";
  2289. item.buyer = "";
  2290. item.reservedProportion = "";
  2291. item.reservedPeriod = "";
  2292. item.reservedQty = "";
  2293. item.averageQtyMonth = "";
  2294. item.demandPeriod = "";
  2295. item.forecastClassify = "";
  2296. item.onemonthAvgVolume = "";
  2297. item.threemonthAvgVolume = "";
  2298. item.puFreight = "";
  2299. item.superiorAllotQty = "";
  2300. item.resDemandQty = "";
  2301. item.executeQty = "";
  2302. item.deliveryWarehouseName = "";
  2303. item.deliveryWarehouse = "";
  2304. item.deliveryAllocationName = "";
  2305. item.deliveryAllocation = "";
  2306. item.lastWarehouseName = "";
  2307. item.lastAllocationName = "";
  2308. item.availableQty = "";
  2309. item.lastStockOrgName = "";
  2310. item.centralWarehouseQty = "";
  2311. item.allotCode = "";
  2312. item.deliveryAddress = "";
  2313. item.deliveryAddressName = "";
  2314. item.contacts = "";
  2315. item.contactsPhone = "";
  2316. item.address = "";
  2317. });
  2318. }
  2319. }
  2320. if (
  2321. this.referCondition.type == "CONTACTS_PARAM" &&
  2322. this.referCondition.title == "需求人员"
  2323. ) {
  2324. this.personOptions = selection;
  2325. this.basicForm.demandPersonal = selection[0].code;
  2326. this.basicForm.demandPersonalName = selection[0].name;
  2327. }
  2328. if (
  2329. this.referCondition.type == "ORG_PARAM" &&
  2330. this.referCondition.title == "采购组织"
  2331. ) {
  2332. this.adjust.puOrg = selection[0].id;
  2333. this.adjust.purOrgName = selection[0].name;
  2334. }
  2335. if (
  2336. this.referCondition.type == "CONTACTS_PARAM" &&
  2337. this.referCondition.title == "采购员"
  2338. ) {
  2339. this.purchaseManOptions = selection;
  2340. this.adjust.purchaseMan = selection[0].code;
  2341. this.adjust.purchaseManName = selection[0].name;
  2342. }
  2343. if (
  2344. this.referCondition.type == "SUPPLIER_PARAM" &&
  2345. this.referCondition.title == "补单供应商"
  2346. ) {
  2347. this.adjust.additionalSupplier = selection[0].id;
  2348. this.adjust.additionalSupplierName = selection[0].name;
  2349. }
  2350. if (
  2351. this.referCondition.type == "WAREHOUSE_PARAM" &&
  2352. this.referCondition.title == "收货仓库"
  2353. ) {
  2354. this.adjust.warehouse = selection[0].id;
  2355. this.adjust.warehouseName = selection[0].name;
  2356. this.adjust.csFlag = selection[0].csFlag;
  2357. this.adjust.allocation = "";
  2358. this.adjust.allocationName = "";
  2359. this.adjust.deliveryAddressName = "";
  2360. this.adjust.deliveryAddress = "";
  2361. this.adjust.contacts = "";
  2362. this.adjust.contactsPhone = "";
  2363. this.adjust.address = "";
  2364. // 选择完清空参数里面的组织id
  2365. this.referCondition.pkOrg = "";
  2366. }
  2367. if (
  2368. this.referCondition.type == "ALLOCATION_PARAM" &&
  2369. this.referCondition.title == "收货货位"
  2370. ) {
  2371. this.adjust.allocation = selection[0].id;
  2372. this.adjust.allocationName = selection[0].name;
  2373. }
  2374. if (
  2375. this.referCondition.type == "ADDRESS_PARAM" &&
  2376. this.referCondition.title == "收货地址"
  2377. ) {
  2378. this.adjust.deliveryAddressName = selection[0].name;
  2379. this.adjust.deliveryAddress = selection[0].code;
  2380. this.adjust.contacts = selection[0].contactsName;
  2381. this.adjust.contactsPhone = selection[0].contactsPhone;
  2382. this.adjust.address = selection[0].address;
  2383. }
  2384. if (this.referCondition.type == "DEPT_PARAM") {
  2385. this.deptOptions = selection;
  2386. this.basicForm.demandDept = selection[0].id;
  2387. this.basicForm.demandDeptName = selection[0].name;
  2388. }
  2389. if (this.referCondition.title == "选择收货仓库") {
  2390. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse =
  2391. selection[0].id;
  2392. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName =
  2393. selection[0].name;
  2394. this.basicForm.puDemandItemList[this.tableIndex].csFlag =
  2395. selection[0].csFlag;
  2396. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation =
  2397. null;
  2398. this.basicForm.puDemandItemList[
  2399. this.tableIndex
  2400. ].deliveryAllocationName = null;
  2401. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName =
  2402. null;
  2403. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = null;
  2404. this.basicForm.puDemandItemList[this.tableIndex].contacts = null;
  2405. this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = null;
  2406. this.basicForm.puDemandItemList[this.tableIndex].address = null;
  2407. // 选择完清空参数里面的组织id
  2408. this.referCondition.pkOrg = "";
  2409. }
  2410. if (this.referCondition.title == "选择收货货位") {
  2411. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation =
  2412. selection[0].id;
  2413. this.basicForm.puDemandItemList[
  2414. this.tableIndex
  2415. ].deliveryAllocationName = selection[0].name;
  2416. }
  2417. if (this.referCondition.title == "选择补单供应商") {
  2418. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier =
  2419. selection[0].id;
  2420. this.basicForm.puDemandItemList[
  2421. this.tableIndex
  2422. ].additionalSupplierName = selection[0].name;
  2423. }
  2424. if (this.referCondition.title == "选择收货地址") {
  2425. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName =
  2426. selection[0].name;
  2427. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress =
  2428. selection[0].id;
  2429. this.basicForm.puDemandItemList[this.tableIndex].contacts =
  2430. selection[0].contactsName;
  2431. this.basicForm.puDemandItemList[this.tableIndex].contactsPhone =
  2432. selection[0].contactsPhone;
  2433. this.basicForm.puDemandItemList[this.tableIndex].address =
  2434. selection[0].address;
  2435. }
  2436. },
  2437. // 粘贴来的数据
  2438. async pasteMe(e, scope, index) {
  2439. this.$modal.loading("正在处理数据...");
  2440. e.preventDefault(); //阻止默认粘贴事件
  2441. let source = e.clipboardData.getData("Text");
  2442. console.log("scope", scope.column.property);
  2443. // 首先对源头进行解析
  2444. let rows = source.split("\r\n"); // 拆成一个数组
  2445. // 数组去除空字符串
  2446. rows = rows.filter((item) => {
  2447. return item && item.trim();
  2448. });
  2449. if (rows.length < 100) {
  2450. // 粘贴物料编码
  2451. if (scope.column.property == "materialCode") {
  2452. await getRefer({ type: "MATERIAL_PARAM", materialCodeList: rows })
  2453. .then((res) => {
  2454. this.$modal.closeLoading();
  2455. if (res.code === 200) {
  2456. let rowList = res.rows;
  2457. let newLine = [];
  2458. for (let i = 0; i < rowList.length; i++) {
  2459. let line = { ...this.sonModel };
  2460. line.isUrgency =
  2461. this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2462. line.isReplenishment =
  2463. this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2464. line.demandCustomer = this.basicForm.customer;
  2465. line.demandCustomerName = this.basicForm.customerName;
  2466. line.materialCode = rowList[i].code;
  2467. line.material = rowList[i].id;
  2468. line.materialName = rowList[i].name;
  2469. line.classifyId = rowList[i].classifyId;
  2470. line.materialClassifyOneName = rowList[i].oneClass;
  2471. line.materialClassifyTwoName = rowList[i].twoClass;
  2472. line.materialClassifyThreeName = rowList[i].threeClass;
  2473. line.materialClassifyFourName = rowList[i].fourClass;
  2474. line.specification = rowList[i].specification;
  2475. line.model = rowList[i].model;
  2476. line.unit = rowList[i].unitId;
  2477. line.unitName = rowList[i].unitIdName;
  2478. line.registrant = rowList[i].registrant;
  2479. line.manufacturerName = rowList[i].manufacturerIdName;
  2480. line.puPeriod = rowList[i].deliveryPeriod;
  2481. line.expiry = rowList[i].usefulLife;
  2482. line.expiryUnit = rowList[i].expiryUnitIdName;
  2483. // line.minPackage = rowList[i].usefulLife
  2484. line.minPackage = rowList[i].minPackQty;
  2485. line.minOrderQty = rowList[i].minOrderQty;
  2486. line.minBatch = rowList[i].minBatchQty;
  2487. line.safeStock = rowList[i].safeStock;
  2488. line.purOrgName = rowList[i].purchasingOrganizationName;
  2489. line.puOrg = rowList[i].purchasingOrganization;
  2490. // 物料存储条件和运输条件
  2491. line.transportationCondition =
  2492. rowList[i].transportationCondition;
  2493. line.storageCondition = rowList[i].storageCondition;
  2494. newLine.push(line);
  2495. console.log("临时数组", newLine);
  2496. }
  2497. // 删除指定下标
  2498. this.basicForm.puDemandItemList.splice(
  2499. index,
  2500. this.basicForm.puDemandItemList.length - index,
  2501. ...newLine
  2502. );
  2503. this.$modal.notifySuccess("共粘贴" + rowList.length + "条数据");
  2504. }
  2505. })
  2506. .then(() => {
  2507. this.$refs.table.doLayout();
  2508. })
  2509. .catch((err) => {
  2510. this.$modal.closeLoading();
  2511. });
  2512. // 粘贴实际业务需求量
  2513. } else if (scope.column.property == "qty") {
  2514. console.log("复制内容:", rows);
  2515. let newLine = [];
  2516. if (this.basicForm.puDemandItemList.length <= 1) {
  2517. for (let i = 0; i < rows.length; i++) {
  2518. let line = { ...this.sonModel };
  2519. line.isUrgency = this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2520. line.isReplenishment =
  2521. this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2522. line.demandCustomer = this.basicForm.customer;
  2523. line.demandCustomerName = this.basicForm.customerName;
  2524. line.qty = rows[i];
  2525. newLine.push(line);
  2526. }
  2527. // 删除指定下标
  2528. this.basicForm.puDemandItemList.splice(
  2529. index,
  2530. this.basicForm.puDemandItemList.length - index,
  2531. ...newLine
  2532. );
  2533. this.$modal.notifySuccess("共粘贴" + rows.length + "条数据");
  2534. this.$refs.table.doLayout();
  2535. this.$modal.closeLoading();
  2536. } else {
  2537. for (
  2538. let i = index, j = 0;
  2539. i < this.basicForm.puDemandItemList.length;
  2540. i++, j++
  2541. ) {
  2542. this.basicForm.puDemandItemList[i].qty = rows[j];
  2543. }
  2544. this.$refs.table.doLayout();
  2545. this.$modal.closeLoading();
  2546. }
  2547. // 粘贴补单供应商
  2548. } else if (scope.column.property == "additionalSupplierName") {
  2549. await getRefer({ type: "SUPPLIER_PARAM", searchList: rows })
  2550. .then((res) => {
  2551. this.$modal.closeLoading();
  2552. if (res.code === 200) {
  2553. let rowList = res.rows;
  2554. let newLine = [];
  2555. for (let i = 0; i < rowList.length; i++) {
  2556. let line = { ...this.sonModel };
  2557. line.isUrgency =
  2558. this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2559. line.isReplenishment =
  2560. this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2561. line.demandCustomer = this.basicForm.customer;
  2562. line.demandCustomerName = this.basicForm.customerName;
  2563. line.additionalSupplier = rowList[i].id;
  2564. line.additionalSupplierName = rowList[i].name;
  2565. newLine.push(line);
  2566. console.log("临时数组", newLine);
  2567. }
  2568. if (this.basicForm.puDemandItemList.length <= 1) {
  2569. // 删除指定下标
  2570. this.basicForm.puDemandItemList.splice(
  2571. index,
  2572. this.basicForm.puDemandItemList.length - index,
  2573. ...newLine
  2574. );
  2575. this.$modal.notifySuccess(
  2576. "共粘贴" + rowList.length + "条数据"
  2577. );
  2578. } else {
  2579. for (
  2580. let i = index, j = 0;
  2581. i < this.basicForm.puDemandItemList.length;
  2582. i++, j++
  2583. ) {
  2584. this.basicForm.puDemandItemList[i].additionalSupplier =
  2585. newLine[j].additionalSupplier;
  2586. this.basicForm.puDemandItemList[i].additionalSupplierName =
  2587. newLine[j].additionalSupplierName;
  2588. }
  2589. this.$refs.table.doLayout();
  2590. this.$modal.closeLoading();
  2591. }
  2592. }
  2593. })
  2594. .then(() => {
  2595. this.$refs.table.doLayout();
  2596. })
  2597. .catch((err) => {
  2598. this.$modal.closeLoading();
  2599. });
  2600. } else if (scope.column.property == "deliveryAddressName") {
  2601. await getRefer({ type: "ADDRESS_PARAM", searchList: rows })
  2602. .then((res) => {
  2603. this.$modal.closeLoading();
  2604. if (res.code === 200) {
  2605. let rowList = res.rows;
  2606. let newLine = [];
  2607. for (let i = 0; i < rowList.length; i++) {
  2608. let line = { ...this.sonModel };
  2609. line.isUrgency =
  2610. this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2611. line.isReplenishment =
  2612. this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2613. line.demandCustomer = this.basicForm.customer;
  2614. line.demandCustomerName = this.basicForm.customerName;
  2615. line.deliveryAddressName = rowList[i].name;
  2616. line.deliveryAddress = rowList[i].code;
  2617. line.contacts = rowList[i].contactsName;
  2618. line.contactsPhone = rowList[i].contactsPhone;
  2619. line.address = rowList[i].address;
  2620. newLine.push(line);
  2621. console.log("临时数组", newLine);
  2622. }
  2623. if (this.basicForm.puDemandItemList.length <= 1) {
  2624. // 删除指定下标
  2625. this.basicForm.puDemandItemList.splice(
  2626. index,
  2627. this.basicForm.puDemandItemList.length - index,
  2628. ...newLine
  2629. );
  2630. this.$modal.notifySuccess(
  2631. "共粘贴" + rowList.length + "条数据"
  2632. );
  2633. } else {
  2634. for (
  2635. let i = index, j = 0;
  2636. i < this.basicForm.puDemandItemList.length;
  2637. i++, j++
  2638. ) {
  2639. this.basicForm.puDemandItemList[i].deliveryAddressName =
  2640. newLine[j].deliveryAddressName;
  2641. this.basicForm.puDemandItemList[i].deliveryAddress =
  2642. newLine[j].deliveryAddress;
  2643. this.basicForm.puDemandItemList[i].contacts =
  2644. newLine[j].contacts;
  2645. this.basicForm.puDemandItemList[i].contactsPhone =
  2646. newLine[j].contactsPhone;
  2647. this.basicForm.puDemandItemList[i].address =
  2648. newLine[j].address;
  2649. }
  2650. this.$refs.table.doLayout();
  2651. this.$modal.closeLoading();
  2652. }
  2653. }
  2654. })
  2655. .then(() => {
  2656. this.$refs.table.doLayout();
  2657. })
  2658. .catch((err) => {
  2659. this.$modal.closeLoading();
  2660. });
  2661. }
  2662. } else {
  2663. this.$modal.notifyWarning("复制长度不能超过100!");
  2664. this.$modal.closeLoading();
  2665. }
  2666. },
  2667. // 明细行选择物料编码带出数据
  2668. chooseMaterial(index) {
  2669. console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
  2670. this.tableIndex = index;
  2671. // 传0只展示同步NC了的物料
  2672. this.$refs.materialRefer.init(0);
  2673. },
  2674. selectMaterial(selection) {
  2675. console.log("选中的物料", selection);
  2676. if (selection.length <= 1) {
  2677. // 选择新物料时先清空行内其他信息
  2678. this.basicForm.puDemandItemList[this.tableIndex].reservedProportion =
  2679. null;
  2680. this.basicForm.puDemandItemList[this.tableIndex].reservedPeriod = null;
  2681. this.basicForm.puDemandItemList[this.tableIndex].reservedQty = null;
  2682. this.basicForm.puDemandItemList[this.tableIndex].qty = null;
  2683. this.basicForm.puDemandItemList[this.tableIndex].deliveryDate = null;
  2684. this.basicForm.puDemandItemList[this.tableIndex].remark = null;
  2685. this.basicForm.puDemandItemList[this.tableIndex].resDemandQty = null;
  2686. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse =
  2687. null;
  2688. this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName =
  2689. null;
  2690. this.basicForm.puDemandItemList[this.tableIndex].deliveryAllocation =
  2691. null;
  2692. this.basicForm.puDemandItemList[
  2693. this.tableIndex
  2694. ].deliveryAllocationName = null;
  2695. this.basicForm.puDemandItemList[this.tableIndex].additionalSupplier =
  2696. null;
  2697. this.basicForm.puDemandItemList[
  2698. this.tableIndex
  2699. ].additionalSupplierName = null;
  2700. this.basicForm.puDemandItemList[this.tableIndex].periodUnit = null;
  2701. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddressName =
  2702. null;
  2703. this.basicForm.puDemandItemList[this.tableIndex].deliveryAddress = null;
  2704. this.basicForm.puDemandItemList[this.tableIndex].contacts = null;
  2705. this.basicForm.puDemandItemList[this.tableIndex].contactsPhone = null;
  2706. this.basicForm.puDemandItemList[this.tableIndex].address = null;
  2707. this.basicForm.puDemandItemList[this.tableIndex].priceType = "order";
  2708. this.basicForm.puDemandItemList[this.tableIndex].lastWarehouseName =
  2709. null;
  2710. this.basicForm.puDemandItemList[this.tableIndex].lastWarehouse = null;
  2711. this.basicForm.puDemandItemList[this.tableIndex].lastAllocation = null;
  2712. this.basicForm.puDemandItemList[this.tableIndex].lastAllocationName =
  2713. null;
  2714. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyOne =
  2715. null;
  2716. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyTwo =
  2717. null;
  2718. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyThree =
  2719. null;
  2720. this.basicForm.puDemandItemList[this.tableIndex].materialClassifyFour =
  2721. null;
  2722. this.basicForm.puDemandItemList[this.tableIndex].lastStockOrg = null;
  2723. this.basicForm.puDemandItemList[this.tableIndex].lastStockOrgName =
  2724. null;
  2725. this.basicForm.puDemandItemList[this.tableIndex].buyer = null;
  2726. this.basicForm.puDemandItemList[this.tableIndex].buyerName = null;
  2727. // 通过选择物料查询采购员
  2728. queryMan(selection[0].id).then((res) => {
  2729. if (res.code === 200 && res.rows.length !== 0) {
  2730. this.basicForm.puDemandItemList[this.tableIndex].buyer =
  2731. res.rows[0].buyer;
  2732. this.basicForm.puDemandItemList[this.tableIndex].buyerName =
  2733. res.rows[0].buyerName;
  2734. }
  2735. });
  2736. this.basicForm.puDemandItemList[this.tableIndex].materialCode =
  2737. selection[0].code;
  2738. this.basicForm.puDemandItemList[this.tableIndex].material =
  2739. selection[0].id;
  2740. this.basicForm.puDemandItemList[this.tableIndex].materialName =
  2741. selection[0].name;
  2742. this.basicForm.puDemandItemList[this.tableIndex].classifyId =
  2743. selection[0].classifyId;
  2744. this.basicForm.puDemandItemList[
  2745. this.tableIndex
  2746. ].materialClassifyOneName = selection[0].oneClass;
  2747. this.basicForm.puDemandItemList[
  2748. this.tableIndex
  2749. ].materialClassifyTwoName = selection[0].twoClass;
  2750. this.basicForm.puDemandItemList[
  2751. this.tableIndex
  2752. ].materialClassifyThreeName = selection[0].threeClass;
  2753. this.basicForm.puDemandItemList[
  2754. this.tableIndex
  2755. ].materialClassifyFourName = selection[0].fourClass;
  2756. this.basicForm.puDemandItemList[this.tableIndex].specification =
  2757. selection[0].specification;
  2758. this.basicForm.puDemandItemList[this.tableIndex].model =
  2759. selection[0].model;
  2760. this.basicForm.puDemandItemList[this.tableIndex].unit =
  2761. selection[0].unitId;
  2762. this.basicForm.puDemandItemList[this.tableIndex].unitName =
  2763. selection[0].unitIdName;
  2764. this.basicForm.puDemandItemList[this.tableIndex].registrant =
  2765. selection[0].registrant;
  2766. this.basicForm.puDemandItemList[this.tableIndex].manufacturerName =
  2767. selection[0].manufacturerIdName;
  2768. this.basicForm.puDemandItemList[this.tableIndex].puPeriod =
  2769. selection[0].deliveryPeriod;
  2770. this.basicForm.puDemandItemList[this.tableIndex].expiry =
  2771. selection[0].usefulLife;
  2772. this.basicForm.puDemandItemList[this.tableIndex].expiryUnit =
  2773. selection[0].expiryUnitIdName;
  2774. // this.basicForm.puDemandItemList[this.tableIndex].minPackage = selection[0].usefulLife
  2775. this.basicForm.puDemandItemList[this.tableIndex].minPackage =
  2776. selection[0].minPackQty;
  2777. this.basicForm.puDemandItemList[this.tableIndex].minOrderQty =
  2778. selection[0].minOrderQty;
  2779. this.basicForm.puDemandItemList[this.tableIndex].minBatch =
  2780. selection[0].minBatchQty;
  2781. this.basicForm.puDemandItemList[this.tableIndex].safeStock =
  2782. selection[0].safeStock;
  2783. this.basicForm.puDemandItemList[this.tableIndex].purOrgName =
  2784. selection[0].purchasingOrganizationName;
  2785. this.basicForm.puDemandItemList[this.tableIndex].puOrg =
  2786. selection[0].purchasingOrganization;
  2787. // 物料存储条件和运输条件
  2788. this.basicForm.puDemandItemList[
  2789. this.tableIndex
  2790. ].transportationCondition = selection[0].transportationCondition;
  2791. this.basicForm.puDemandItemList[this.tableIndex].storageCondition =
  2792. selection[0].storageCondition;
  2793. // 选中骨科耗材时候的物料,需求客户不必填
  2794. } else {
  2795. let newLine = [];
  2796. for (let i = 0; i < selection.length; i++) {
  2797. let line = { ...this.sonModel };
  2798. line.isUrgency = this.basicForm.billType == "JJXQ" ? "Y" : "N";
  2799. line.isReplenishment = this.basicForm.billType == "BDXQ" ? "Y" : "N";
  2800. line.demandCustomer = this.basicForm.customer;
  2801. line.demandCustomerName = this.basicForm.customerName;
  2802. // 通过选择物料查询采购员
  2803. queryMan(selection[i].id).then((res) => {
  2804. if (res.code === 200 && res.rows.length !== 0) {
  2805. line.buyer = res.rows[0].buyer;
  2806. line.buyerName = res.rows[0].buyerName;
  2807. }
  2808. });
  2809. line.materialCode = selection[i].code;
  2810. line.material = selection[i].id;
  2811. line.materialName = selection[i].name;
  2812. line.classifyId = selection[i].classifyId;
  2813. line.materialClassifyOneName = selection[i].oneClass;
  2814. line.materialClassifyTwoName = selection[i].twoClass;
  2815. line.materialClassifyThreeName = selection[i].threeClass;
  2816. line.materialClassifyFourName = selection[i].fourClass;
  2817. line.specification = selection[i].specification;
  2818. line.model = selection[i].model;
  2819. line.unit = selection[i].unitId;
  2820. line.unitName = selection[i].unitIdName;
  2821. line.registrant = selection[i].registrant;
  2822. line.manufacturerName = selection[i].manufacturerIdName;
  2823. line.puPeriod = selection[i].deliveryPeriod;
  2824. line.expiry = selection[i].usefulLife;
  2825. line.expiryUnit = selection[i].expiryUnitIdName;
  2826. // line.minPackage = selection[i].usefulLife
  2827. line.minPackage = selection[i].minPackQty;
  2828. line.minOrderQty = selection[i].minOrderQty;
  2829. line.minBatch = selection[i].minBatchQty;
  2830. line.safeStock = selection[i].safeStock;
  2831. line.purOrgName = selection[i].purchasingOrganizationName;
  2832. line.puOrg = selection[i].purchasingOrganization;
  2833. // 物料存储条件和运输条件
  2834. line.transportationCondition = selection[i].transportationCondition;
  2835. line.storageCondition = selection[i].storageCondition;
  2836. // this.basicForm.puDemandItemList.push(line)
  2837. newLine.push(line);
  2838. }
  2839. // 删除指定下标
  2840. this.basicForm.puDemandItemList.splice(this.tableIndex, 1, ...newLine);
  2841. // this.basicForm.puDemandItemList.splice(this.tableIndex,1)
  2842. }
  2843. },
  2844. // 明细行选择参照
  2845. chooseDept(index, type, isPage, title) {
  2846. this.tableIndex = index;
  2847. this.referCondition.type = type;
  2848. this.referCondition.isPage = isPage;
  2849. this.referCondition.title = title;
  2850. this.$refs.refer.init(this.referCondition);
  2851. },
  2852. // 明细行选择仓库需要先确认采购组织
  2853. chooseCangKu(index, type, isPage, title, pkOrg) {
  2854. this.tableIndex = index;
  2855. this.referCondition.type = type;
  2856. this.referCondition.isPage = isPage;
  2857. this.referCondition.title = title;
  2858. if (pkOrg) {
  2859. this.referCondition.pkOrg = pkOrg;
  2860. this.$refs.refer.init(this.referCondition);
  2861. } else {
  2862. this.$modal.notifyWarning("请先确认默认采购组织");
  2863. }
  2864. },
  2865. // 明细行选择货位先确认仓库
  2866. choosehuoWei(index, type, isPage, title, stordocId) {
  2867. this.tableIndex = index;
  2868. this.referCondition.type = type;
  2869. this.referCondition.isPage = isPage;
  2870. this.referCondition.title = title;
  2871. // 选择收货货位前先选择收货仓库
  2872. if (stordocId) {
  2873. this.referCondition.stordocId = stordocId;
  2874. this.$refs.refer.init(this.referCondition);
  2875. } else {
  2876. this.$modal.notifyWarning("请先选择收货仓库");
  2877. }
  2878. },
  2879. // 明细行清空收货仓库,货位,收货地址档案等
  2880. clearHang(index, title) {
  2881. if (title == "选择收货仓库") {
  2882. this.basicForm.puDemandItemList[index].deliveryWarehouseName = null;
  2883. this.basicForm.puDemandItemList[index].deliveryWarehouse = null;
  2884. this.basicForm.puDemandItemList[index].csFlag = null;
  2885. this.basicForm.puDemandItemList[index].deliveryAllocationName = null;
  2886. this.basicForm.puDemandItemList[index].deliveryAllocation = null;
  2887. }
  2888. if (title == "选择收货货位") {
  2889. this.basicForm.puDemandItemList[index].deliveryAllocationName = null;
  2890. this.basicForm.puDemandItemList[index].deliveryAllocation = null;
  2891. }
  2892. if (title == "选择收货地址") {
  2893. this.basicForm.puDemandItemList[index].deliveryAddressName = null;
  2894. this.basicForm.puDemandItemList[index].deliveryAddress = null;
  2895. this.basicForm.puDemandItemList[index].contacts = null;
  2896. this.basicForm.puDemandItemList[index].contactsPhone = null;
  2897. this.basicForm.puDemandItemList[index].address = null;
  2898. }
  2899. if (title == "选择补单供应商") {
  2900. this.basicForm.puDemandItemList[index].additionalSupplierName = null;
  2901. this.basicForm.puDemandItemList[index].additionalSupplier = null;
  2902. }
  2903. // 清空批量调整内字段
  2904. if (title == "cgzz") {
  2905. this.adjust.purOrgName = "";
  2906. this.adjust.puOrg = "";
  2907. this.adjust.warehouse = "";
  2908. this.adjust.warehouseName = "";
  2909. this.adjust.allocation = "";
  2910. this.adjust.allocationName = "";
  2911. }
  2912. if (title == "shck") {
  2913. this.adjust.warehouse = "";
  2914. this.adjust.warehouseName = "";
  2915. this.adjust.allocation = "";
  2916. this.adjust.allocationName = "";
  2917. this.adjust.csFlag = "";
  2918. }
  2919. if (title == "shhw") {
  2920. this.adjust.allocation = "";
  2921. this.adjust.allocationName = "";
  2922. }
  2923. if (title == "bdgys") {
  2924. this.adjust.additionalSupplier = "";
  2925. this.adjust.additionalSupplierName = "";
  2926. }
  2927. if (title == "shdz") {
  2928. this.adjust.deliveryAddressName = "";
  2929. this.adjust.deliveryAddress = "";
  2930. this.adjust.contacts = "";
  2931. this.adjust.contactsPhone = "";
  2932. this.adjust.address = "";
  2933. }
  2934. },
  2935. // 清除需求客户将明细行内也清空
  2936. cleanCustomer() {
  2937. this.basicForm.customer = "";
  2938. this.basicForm.customerName = "";
  2939. this.basicForm.customerCode = "";
  2940. if (this.basicForm.puDemandItemList.length !== 0) {
  2941. this.basicForm.puDemandItemList.forEach((item) => {
  2942. item.demandCustomerName = "";
  2943. item.demandCustomer = "";
  2944. item.status = "";
  2945. item.buyerName = "";
  2946. item.buyer = "";
  2947. item.reservedProportion = "";
  2948. item.reservedPeriod = "";
  2949. item.reservedQty = "";
  2950. item.averageQtyMonth = "";
  2951. item.demandPeriod = "";
  2952. item.forecastClassify = "";
  2953. item.onemonthAvgVolume = "";
  2954. item.threemonthAvgVolume = "";
  2955. item.puFreight = "";
  2956. item.superiorAllotQty = "";
  2957. item.resDemandQty = "";
  2958. item.executeQty = "";
  2959. item.deliveryWarehouseName = "";
  2960. item.deliveryWarehouse = "";
  2961. item.deliveryAllocationName = "";
  2962. item.deliveryAllocation = "";
  2963. item.lastWarehouseName = "";
  2964. item.lastAllocationName = "";
  2965. item.availableQty = "";
  2966. item.lastStockOrgName = "";
  2967. item.centralWarehouseQty = "";
  2968. item.allotCode = "";
  2969. item.deliveryAddress = "";
  2970. item.deliveryAddressName = "";
  2971. item.contacts = "";
  2972. item.contactsPhone = "";
  2973. item.address = "";
  2974. });
  2975. }
  2976. },
  2977. // 批量调整
  2978. adjustPl() {
  2979. if (this.ids.length == 0) {
  2980. this.$modal.notifyWarning("请至少选择一项数据进行操作!");
  2981. } else {
  2982. this.adjust.open = true;
  2983. }
  2984. },
  2985. // 批量调整确认
  2986. confirmAdjust() {
  2987. console.log("data", this.adjust);
  2988. if (
  2989. this.adjust.csFlag == "N" ||
  2990. this.adjust.csFlag == "" ||
  2991. this.adjust.allocationName
  2992. ) {
  2993. this.basicForm.puDemandItemList.forEach((item) => {
  2994. this.ids.some((val) => {
  2995. if (val == item.id) {
  2996. if (this.adjust.purchaseMan) {
  2997. item.buyer = this.adjust.purchaseMan;
  2998. item.buyerName = this.adjust.purchaseManName;
  2999. }
  3000. if (this.adjust.priceType) {
  3001. item.priceType = this.adjust.priceType;
  3002. }
  3003. if (this.adjust.additionalSupplierName) {
  3004. item.additionalSupplier = this.adjust.additionalSupplier;
  3005. item.additionalSupplierName =
  3006. this.adjust.additionalSupplierName;
  3007. }
  3008. if (this.adjust.purOrgName) {
  3009. item.purOrgName = this.adjust.purOrgName;
  3010. item.puOrg = this.adjust.puOrg;
  3011. item.deliveryWarehouse = this.adjust.warehouse;
  3012. item.deliveryWarehouseName = this.adjust.warehouseName;
  3013. item.deliveryAllocation = this.adjust.allocation;
  3014. item.deliveryAllocationName = this.adjust.allocationName;
  3015. item.deliveryAddressName = this.adjust.deliveryAddressName;
  3016. item.deliveryAddress = this.adjust.deliveryAddress;
  3017. item.contacts = this.adjust.contacts;
  3018. item.contactsPhone = this.adjust.contactsPhone;
  3019. item.address = this.adjust.address;
  3020. }
  3021. if (this.adjust.warehouseName) {
  3022. item.deliveryWarehouse = this.adjust.warehouse;
  3023. item.deliveryWarehouseName = this.adjust.warehouseName;
  3024. item.csFlag = this.adjust.csFlag;
  3025. item.deliveryAllocation = this.adjust.allocation;
  3026. item.deliveryAllocationName = this.adjust.allocationName;
  3027. }
  3028. // if(this.adjust.allocationName) {
  3029. // item.deliveryAllocation = this.adjust.allocation
  3030. // item.deliveryAllocationName = this.adjust.allocationName
  3031. // }
  3032. if (this.adjust.remark) {
  3033. item.remark = this.adjust.remark;
  3034. }
  3035. if (this.adjust.deliveryAddressName) {
  3036. item.deliveryAddressName = this.adjust.deliveryAddressName;
  3037. item.deliveryAddress = this.adjust.deliveryAddress;
  3038. item.contacts = this.adjust.contacts;
  3039. item.contactsPhone = this.adjust.contactsPhone;
  3040. item.address = this.adjust.address;
  3041. }
  3042. }
  3043. this.adjust.open = false;
  3044. });
  3045. });
  3046. } else {
  3047. this.$modal.notifyWarning("收货仓库存在收货货位,请填写!");
  3048. }
  3049. },
  3050. // 批量调整选择仓库
  3051. adjustCangku(type, isPage, title, pkOrg) {
  3052. this.referCondition.type = type;
  3053. this.referCondition.isPage = isPage;
  3054. this.referCondition.title = title;
  3055. if (pkOrg) {
  3056. this.referCondition.pkOrg = pkOrg;
  3057. this.$refs.refer.init(this.referCondition);
  3058. } else {
  3059. this.$modal.notifyWarning("请先选择默认采购组织");
  3060. }
  3061. },
  3062. // 批量调整选择货位
  3063. adjustHuoWei(type, isPage, title, stordocId) {
  3064. this.referCondition.type = type;
  3065. this.referCondition.isPage = isPage;
  3066. this.referCondition.title = title;
  3067. // 选择收货货位前先选择收货仓库
  3068. if (stordocId) {
  3069. this.referCondition.stordocId = stordocId;
  3070. this.$refs.refer.init(this.referCondition);
  3071. } else {
  3072. this.$modal.notifyWarning("请先选择收货仓库");
  3073. }
  3074. },
  3075. // 关闭清空批量调整数据
  3076. closeEvent() {
  3077. this.adjust = {
  3078. open: false,
  3079. puOrg: "",
  3080. purOrgName: "",
  3081. priceType: "",
  3082. purchaseMan: "",
  3083. purchaseManName: "",
  3084. warehouse: "",
  3085. warehouseName: "",
  3086. csFlag: "",
  3087. allocation: "",
  3088. allocationName: "",
  3089. additionalSupplier: "",
  3090. additionalSupplierName: "",
  3091. remark: "",
  3092. deliveryAddress: "",
  3093. deliveryAddressName: "",
  3094. contacts: "",
  3095. contactsPhone: "",
  3096. address: "",
  3097. };
  3098. },
  3099. // 必选标识
  3100. addRedStar(h, { column }) {
  3101. return [
  3102. h("span", { style: "color: #F56C6C" }, "*"),
  3103. h("span", " " + column.label),
  3104. ];
  3105. },
  3106. // 表格表头标星
  3107. anotherRedStar(h, { column }) {
  3108. if (this.isBDXQ) {
  3109. return [
  3110. h("span", { style: "color: #F56C6C" }, "*"),
  3111. h("span", " " + column.label),
  3112. ];
  3113. } else {
  3114. return [h("span", " " + column.label)];
  3115. }
  3116. },
  3117. // 流程跳转
  3118. jumpOA() {
  3119. toOA(this.$store.state.user.name, this.basicForm.flowId).then((res) => {
  3120. if (res.code === 200) {
  3121. window.open(res.oaUrl);
  3122. }
  3123. });
  3124. },
  3125. jisuan({ columns, data }) {
  3126. const means = []; // 合计
  3127. columns.forEach((column, columnIndex) => {
  3128. if (columnIndex === 0) {
  3129. means.push("合计");
  3130. } else {
  3131. const values = data.map((item) => Number(item[column.property]));
  3132. // 合计
  3133. if (column.property === "qty") {
  3134. means[columnIndex] = values.reduce((prev, curr) => {
  3135. const value = Number(curr);
  3136. if (!isNaN(value)) {
  3137. return prev + curr;
  3138. } else {
  3139. return prev;
  3140. }
  3141. }, 0);
  3142. // means[columnIndex] += ' 元'
  3143. // 改变了ele的合计方式,扩展了合计场景
  3144. // 你以为就只有上面这样玩吗?错啦,你还可以自定义样式哦
  3145. // means[columnIndex] = '<span style="color: red">' + means[columnIndex] + '元</span>'
  3146. means[columnIndex] = +means[columnIndex];
  3147. } else {
  3148. means[columnIndex] = "";
  3149. }
  3150. }
  3151. });
  3152. // 返回一个二维数组的表尾合计(不要平均值,你就不要在数组中添加)
  3153. return [means];
  3154. },
  3155. },
  3156. };
  3157. </script>
  3158. <style lang="scss" scoped>
  3159. .btn_group {
  3160. // width: 100%;
  3161. // margin: 20px 0;
  3162. display: flex;
  3163. justify-content: space-between;
  3164. position: absolute;
  3165. top: 10px;
  3166. right: 20px;
  3167. }
  3168. .btn_grooup {
  3169. margin-bottom: 10px;
  3170. display: flex;
  3171. justify-content: space-between;
  3172. }
  3173. .hang {
  3174. margin: auto;
  3175. }
  3176. .hang ::v-deep .el-form-item__content {
  3177. margin-left: 0px !important;
  3178. }
  3179. // .el-table ::v-deep .el-form-item__error{
  3180. // padding-top: 0;
  3181. // top: 70%
  3182. // }
  3183. ::v-deep .elx-body--row .success-row {
  3184. background-color: #ff8a8a !important;
  3185. }
  3186. ::v-deep .uxbeautifyTableClass .elx-table--header-wrapper {
  3187. color: #606266;
  3188. }
  3189. .pltzTxt {
  3190. text-align: right;
  3191. font-size: medium;
  3192. padding-right: 2%;
  3193. }
  3194. .pltzIpt {
  3195. width: 90%;
  3196. }
  3197. ::v-deep .el-form-item {
  3198. margin-bottom: 8px;
  3199. }
  3200. </style>