inventoryTable.vue 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136
  1. <template>
  2. <el-form ref="form" :model="form" :rules="rules">
  3. <ele-pro-table
  4. ref="table"
  5. :needPage="false"
  6. :columns="columns"
  7. :datasource="form.datasource"
  8. class="time-form"
  9. @columns-change="handleColumnChange"
  10. :cache-key="cacheKeyUrl"
  11. height="350"
  12. full-height="calc(100vh - 76px)"
  13. :show-summary="clientEnvironmentId == 4"
  14. :summary-method="getSummaries"
  15. :row-class-name="tableRowClassName"
  16. >
  17. <!-- 表头工具栏 -->
  18. <template v-slot:toolbar>
  19. <div class="headbox">
  20. <el-button
  21. v-if="isShowAdd && needProduce != 4"
  22. size="small"
  23. type="primary"
  24. icon="el-icon-plus"
  25. class="ele-btn-icon"
  26. @click="handlAdd"
  27. >
  28. 新增
  29. </el-button>
  30. <el-button
  31. size="small"
  32. type="primary"
  33. icon="el-icon-plus"
  34. class="ele-btn-icon"
  35. @click="handParent()"
  36. v-if="isShowAdd && needProduce == 4"
  37. >
  38. 新增
  39. </el-button>
  40. </div>
  41. </template>
  42. <template v-slot:technicalDrawings="{ row, $index }">
  43. <el-form-item :prop="'datasource.' + $index + '.technicalDrawings'">
  44. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  45. </el-form-item>
  46. </template>
  47. <template v-slot:remark="{ row, $index }">
  48. <el-form-item :prop="'datasource.' + $index + '.remark'">
  49. <el-input
  50. clearable
  51. v-model="row.remark"
  52. type="textarea"
  53. placeholder="请输入"
  54. />
  55. </el-form-item>
  56. </template>
  57. <template v-slot:packagingStrength="scope">
  58. <el-form-item>
  59. <DictSelection
  60. dict-name="包装强度"
  61. @change="keyChange(scope.$index, scope.row, 'packagingStrength')"
  62. v-model="scope.row.extField.packagingStrength"
  63. :isOne="scope.$index === 0"
  64. ></DictSelection>
  65. </el-form-item>
  66. </template>
  67. <template v-slot:packagingDensity="scope">
  68. <el-form-item>
  69. <DictSelection
  70. dict-name="包装密度"
  71. @change="keyChange(scope.$index, scope.row, 'packagingDensity')"
  72. v-model="scope.row.extField.packagingDensity"
  73. :isOne="scope.$index === 0"
  74. ></DictSelection>
  75. </el-form-item>
  76. </template>
  77. <template v-slot:batchStockId="scope">
  78. <el-form-item :prop="'datasource.' + scope.$index + '.batchStockId'">
  79. <!-- <el-input v-model="scope.row.batchNo" v-no-chinese></el-input> -->
  80. <el-select
  81. v-model="scope.row.batchStockId"
  82. clearable
  83. placeholder="请选择"
  84. @change="batchNoChange(scope.$index, scope.row)"
  85. >
  86. <el-option
  87. v-for="item in scope.row.batchNoList || []"
  88. :key="item.id"
  89. :label="item.batchNo"
  90. :value="item.id"
  91. >
  92. </el-option>
  93. </el-select>
  94. </el-form-item>
  95. </template>
  96. <!-- 生产编号 可编辑 -->
  97. <template v-slot:productionCodes="{ row }">
  98. <el-form-item>
  99. <el-input v-model="row.productionCodes" v-no-chinese></el-input>
  100. </el-form-item>
  101. </template>
  102. <template v-slot:blockCount="scope">
  103. <el-form-item
  104. :prop="'datasource.' + scope.$index + '.blockCount'"
  105. :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
  106. >
  107. <el-input
  108. v-model="scope.row.blockCount"
  109. @input="
  110. (val) => tableHandleKeyUp(scope.row, scope.$index, 'blockCount')
  111. "
  112. ></el-input>
  113. </el-form-item>
  114. </template>
  115. <template v-slot:receiveTotalWeight="scope">
  116. <el-form-item
  117. :prop="'datasource.' + scope.$index + '.receiveTotalWeight'"
  118. >
  119. <el-input
  120. type="number"
  121. v-model="scope.row.receiveTotalWeight"
  122. @input="changeSendTotalWeight(scope.row, scope.$index)"
  123. style="width: calc(100% - 70px); margin-right: 10px"
  124. >
  125. <template slot="append">
  126. {{ scope.row.weightUnit }}
  127. </template>
  128. </el-input>
  129. <el-button
  130. size="small"
  131. type="primary"
  132. v-if="entrustedCode"
  133. @click.native="(e) => handleInnerBound(e, scope.row, scope.$index)"
  134. >选择
  135. </el-button>
  136. </el-form-item>
  137. </template>
  138. <template v-slot:sendTotalWeight="scope">
  139. <el-form-item :prop="'datasource.' + scope.$index + '.sendTotalWeight'">
  140. <el-input
  141. type="number"
  142. v-model="scope.row.sendTotalWeight"
  143. style="width: 100%"
  144. @input="changeSendTotalWeight(scope.row, scope.$index)"
  145. >
  146. <template slot="append">
  147. {{ scope.row.weightUnit }}
  148. </template>
  149. </el-input>
  150. </el-form-item>
  151. </template>
  152. <template v-slot:increaseTotalWeight="scope">
  153. <el-form-item
  154. :prop="'datasource.' + scope.$index + '.increaseTotalWeight'"
  155. >
  156. <el-input
  157. type="number"
  158. v-model="scope.row.increaseTotalWeight"
  159. style="width: 100%"
  160. >
  161. <template slot="append">
  162. {{ scope.row.weightUnit }}
  163. </template>
  164. </el-input>
  165. </el-form-item>
  166. </template>
  167. <template v-slot:warehouseId="scope">
  168. <el-form-item
  169. :prop="'datasource.' + scope.$index + '.warehouseId'"
  170. :rules="[
  171. {
  172. required: isWarehouseId == 1 ? true : false,
  173. message: '请选择仓库',
  174. trigger: 'blur'
  175. }
  176. ]"
  177. >
  178. <el-select
  179. v-model="scope.row.warehouseId"
  180. placeholder="请选择"
  181. @change="warehouseChange(scope.$index, scope.row, true)"
  182. >
  183. <el-option
  184. v-for="item in scope.row.warehouseList"
  185. :key="item.warehouseId"
  186. :label="item.warehouseName"
  187. :value="item.warehouseId"
  188. >
  189. </el-option>
  190. </el-select>
  191. </el-form-item>
  192. </template>
  193. <template v-slot:singlePrice="scope">
  194. <el-form-item
  195. style="margin-bottom: 20px"
  196. :prop="'datasource.' + scope.$index + '.singlePrice'"
  197. :rules="{
  198. required: true,
  199. message: '请输入正确的单价',
  200. trigger: 'change'
  201. }"
  202. >
  203. <el-input
  204. v-model="scope.row.singlePrice"
  205. placeholder="请输入"
  206. @input="changeCount(scope.row, scope.$index)"
  207. type="number"
  208. >
  209. <template slot="append">元</template>
  210. </el-input>
  211. </el-form-item>
  212. </template>
  213. <template v-slot:singleWeight="scope" >
  214. <el-form-item
  215. style="margin-bottom: 20px"
  216. :rules="{
  217. required: false,
  218. trigger: 'change'
  219. }"
  220. :prop="'datasource.' + scope.$index + '.singleWeight'"
  221. >
  222. <el-input
  223. v-model="scope.row.singleWeight"
  224. type="number"
  225. placeholder="请输入"
  226. :disabled="needProduce == 4"
  227. >
  228. <template slot="append">
  229. {{ scope.row.weightUnit }}
  230. </template>
  231. </el-input>
  232. </el-form-item>
  233. </template>
  234. <template v-slot:headerWarehouseNum="{ column }">
  235. <span class="is-required">{{ column.label }}</span>
  236. </template>
  237. <template v-slot:headerWarehouseId="{ column }">
  238. <span :class="isWarehouseId == 1 ? 'is-required' : ''">{{
  239. column.label
  240. }}</span>
  241. </template>
  242. <template v-slot:headerTotalCount="{ column }">
  243. <span class="is-required">{{ column.label }}</span>
  244. </template>
  245. <template v-slot:headerReceiveTotalWeight="{ column }">
  246. <span :class="{ 'is-required': entrustedCode && pricingWay == 2 }">{{
  247. column.label
  248. }}</span>
  249. </template>
  250. <template v-slot:saleCount="scope">
  251. <el-form-item
  252. style="margin-bottom: 20px"
  253. :prop="'datasource.' + scope.$index + '.saleCount'"
  254. :rules="{
  255. required: true,
  256. message: '请输入数量',
  257. trigger: 'change'
  258. }"
  259. >
  260. <el-input
  261. v-model="scope.row.saleCount"
  262. placeholder="请输入"
  263. type="number"
  264. :min="0"
  265. @input="changeCount(scope.row, scope.$index, false)"
  266. >
  267. <template slot="append">
  268. <el-select
  269. v-model="scope.row.saleUnitId"
  270. style="width: 80px"
  271. @change="changeCount(scope.row, scope.$index)"
  272. :disabled="clientEnvironmentId == 4"
  273. >
  274. <el-option
  275. :label="item.conversionUnit"
  276. :value="item.id"
  277. @click.native="packingChange(item, scope.$index)"
  278. v-for="(item, index) in scope.row.packageDispositionList"
  279. :key="index"
  280. ></el-option>
  281. </el-select>
  282. </template>
  283. </el-input>
  284. </el-form-item>
  285. </template>
  286. <template v-slot:warehouseNum="scope">
  287. <el-form-item
  288. :prop="'datasource.' + scope.$index + '.warehouseNum'"
  289. >
  290. <el-link
  291. v-if="scope.row.isSuspend === 1"
  292. :underline="false"
  293. type="primary"
  294. @click="pendingReplaceTable(scope.row, scope.$index)"
  295. >
  296. {{ scope.row.warehouseNum }}
  297. </el-link>
  298. <span v-else>{{ scope.row.warehouseNum }}</span>
  299. </el-form-item>
  300. </template>
  301. <!-- <template v-slot:saleUnit="scope">
  302. <el-form-item
  303. style="margin-bottom: 20px"
  304. :prop="'datasource.' + scope.$index + '.saleUnitId'"
  305. >
  306. <el-select
  307. v-model="scope.row.saleUnitId"
  308. style="width: 100%"
  309. @change="changeCount(scope.row, scope.$index)"
  310. :disabled="clientEnvironmentId == 4"
  311. >
  312. <el-option
  313. :label="item.conversionUnit"
  314. :value="item.id"
  315. @click.native="packingChange(item, scope.$index)"
  316. v-for="(item, index) in scope.row.packageDispositionList"
  317. :key="index"
  318. ></el-option>
  319. </el-select>
  320. </el-form-item>
  321. </template> -->
  322. <template v-slot:modelKey="scope">
  323. <el-form-item :prop="'datasource.' + scope.$index + '.' + 'modelKey'">
  324. <DictSelection
  325. dictName="物品机型"
  326. clearable
  327. v-model="scope.row.modelKey"
  328. :isOne="scope.$index === 0"
  329. filterable
  330. allow-create
  331. default-first-option
  332. multiple
  333. >
  334. </DictSelection>
  335. </el-form-item>
  336. </template>
  337. <template v-slot:colorKey="scope">
  338. <el-form-item :prop="'datasource.' + scope.$index + '.' + 'colorKey'">
  339. <DictSelection
  340. dictName="物品颜色"
  341. clearable
  342. v-model="scope.row.colorKey"
  343. :isOne="scope.$index === 0"
  344. filterable
  345. allow-create
  346. default-first-option
  347. multiple
  348. >
  349. </DictSelection>
  350. </el-form-item>
  351. </template>
  352. <!-- 操作列 -->
  353. <template v-slot:action="scope">
  354. <el-popconfirm
  355. class="ele-action"
  356. title="确定要删除吗?"
  357. @confirm="remove(scope.$index)"
  358. >
  359. <template v-slot:reference>
  360. <el-link type="danger" :underline="false" icon="el-icon-delete">
  361. 删除
  362. </el-link>
  363. </template>
  364. </el-popconfirm>
  365. <el-link
  366. type="primary"
  367. :underline="false"
  368. icon="el-icon-edit"
  369. @click="selectStockLedgerDialogOpen(scope.row)"
  370. >
  371. 替代料
  372. </el-link>
  373. <template v-if="scope.row.batchNo && $hasPermission('eom:saleordersendrecord:pending')">
  374. <el-popconfirm
  375. v-if="scope.row.isSuspend === 1"
  376. class="ele-action"
  377. title="确定要挂起吗?"
  378. @confirm="pending(scope.row, 0)"
  379. >
  380. <template v-slot:reference>
  381. <el-link
  382. type="primary"
  383. :underline="false"
  384. >
  385. 取消挂起
  386. </el-link>
  387. </template>
  388. </el-popconfirm>
  389. <el-link v-else type="primary" :underline="false" @click="pendingReplaceTable(scope.row, scope.$index)">
  390. 挂起
  391. </el-link>
  392. </template>
  393. </template>
  394. </ele-pro-table>
  395. <productListNew
  396. ref="productListRef"
  397. @changeParent="changeParent"
  398. ></productListNew>
  399. <!--入库详情-->
  400. <innertboundDetailsDialog
  401. v-if="innerboundDetailsDialogFlag"
  402. ref="innerboundDetailsDialogRef"
  403. :innerboundDetailsDialogFlag.sync="innerboundDetailsDialogFlag"
  404. @saveDate="saveInnerDate"
  405. ></innertboundDetailsDialog>
  406. <!-- 库存台账 -->
  407. <stock-ledger-dialog
  408. v-if="stockLedgerDialogFlag"
  409. :stock-ledger-dialog-flag.sync="stockLedgerDialogFlag"
  410. ref="stockLedgerDialogRef"
  411. @getStockLedger="getStockLedger"
  412. ></stock-ledger-dialog>
  413. <selectStockLedgerDialog
  414. ref="selectStockLedgerDialogRef"
  415. @changeParent="replaceTable"
  416. ></selectStockLedgerDialog>
  417. <selectStockLedgerDialogPending
  418. ref="selectStockLedgerDialogPendingRef"
  419. @changeParent="pendingReplaceTableConfirm"
  420. ></selectStockLedgerDialogPending>
  421. <BIZproductList
  422. ref="BIZproductListRef"
  423. classType="1"
  424. :isGetInventoryTotal="true"
  425. @changeParent="changeParentBiz"
  426. :typeIds="typeIds"
  427. :isFirstRefreshTable="true"
  428. ></BIZproductList>
  429. </el-form>
  430. </template>
  431. <script>
  432. import { numberReg } from 'ele-admin';
  433. import dictMixins from '@/mixins/dictMixins';
  434. import productListNew from './product-listNew.vue';
  435. import {
  436. getWarehouseOutStock,
  437. getIdWarehouseList
  438. } from '@/api/saleManage/saleorder';
  439. import { copyObj } from '@/utils/util';
  440. import { getFile } from '@/api/system/file';
  441. import innertboundDetailsDialog from '@/BIZComponents/innerboundDetailsDialog.vue';
  442. import stockLedgerDialog from './stockLedger/stockLedgerDialog.vue';
  443. import getDynamicsColumns from '@/mixins/getDynamicsColumns';
  444. // import fileMain from '@/components/addDoc/index.vue';
  445. import selectStockLedgerDialog from '@/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue'; //库存台账
  446. import BIZproductList from '@/BIZComponents/product-list.vue';
  447. import { lbjtList } from '@/enum/dict.js';
  448. import tabMixins from '@/mixins/tableColumnsMixin';
  449. import { levelList } from '@/enum/dict.js';
  450. import { changeCount } from '@/BIZComponents/setProduct.js';
  451. import { parameterGetByCode } from '@/api/main/index.js';
  452. import { getSummaries } from '@/utils/util.js';
  453. import { getBatchList } from '@/api/wms';
  454. import selectStockLedgerDialogPending from './selectStockLedger/selectStockLedgerDialog.vue';
  455. export default {
  456. mixins: [dictMixins, getDynamicsColumns, tabMixins],
  457. props: {
  458. orderId: String,
  459. orderIds: String,
  460. needProduce: [String, Number],
  461. entrustedCode: String,
  462. pricingWay: [String, Number],
  463. isShowAdd: {
  464. type: Boolean,
  465. default: true
  466. },
  467. typeIds: {
  468. type: Array,
  469. default: () => []
  470. },
  471. oldProductList: {
  472. type: Array,
  473. default: () => []
  474. },
  475. sourceType: {
  476. type: [String, Number],
  477. default: ''
  478. },
  479. isTotalCount: {
  480. default: 0
  481. }
  482. },
  483. components: {
  484. // fileMain,
  485. innertboundDetailsDialog,
  486. productListNew,
  487. stockLedgerDialog,
  488. selectStockLedgerDialog,
  489. BIZproductList,
  490. selectStockLedgerDialogPending
  491. },
  492. data() {
  493. const defaultForm = {
  494. key: null,
  495. endTime: '',
  496. isFirst: 0,
  497. name: '',
  498. startTime: '',
  499. workHour: '',
  500. technicalDrawings: []
  501. // warehouseCode:"",
  502. // warehouseId:'',
  503. // warehouseName:'',
  504. };
  505. return {
  506. cacheKeyUrl: 'eos-saleManage-invoice-inventoryTable',
  507. current: {},
  508. childrenColumns: [
  509. {
  510. width: 45,
  511. type: 'selection',
  512. columnKey: 'selection',
  513. align: 'center'
  514. },
  515. {
  516. width: 45,
  517. type: 'index',
  518. columnKey: 'index',
  519. align: 'center',
  520. fixed: 'left'
  521. },
  522. {
  523. minWidth: 100,
  524. prop: 'code',
  525. label: '编码',
  526. align: 'center'
  527. },
  528. {
  529. minWidth: 140,
  530. prop: 'barcodes',
  531. label: '发货条码',
  532. align: 'center'
  533. },
  534. {
  535. minWidth: 100,
  536. prop: 'engrave',
  537. label: '刻码',
  538. align: 'center'
  539. }
  540. ],
  541. selection: [],
  542. discountTotalPrice: 0.0,
  543. allPrice: 0.0,
  544. curIndex: null,
  545. innerboundDetailsDialogFlag: false,
  546. stockLedgerDialogFlag: false,
  547. numberReg,
  548. defaultForm,
  549. warehouseList: [],
  550. dynamicsColumns: [],
  551. isWarehouseId: 0,
  552. blockCountColumn: {},
  553. form: {
  554. datasource: []
  555. },
  556. rules: {},
  557. columnsVersion: 1
  558. };
  559. },
  560. created() {
  561. this.requestDict('产地');
  562. this.requestDict('生产类型');
  563. parameterGetByCode({
  564. code: 'eom_saleManage_invoice_warehouseId'
  565. }).then((res) => {
  566. if (res.value) {
  567. this.isWarehouseId = res.value;
  568. }
  569. });
  570. },
  571. computed: {
  572. canHandl() {
  573. return this.form.datasource.length;
  574. },
  575. clientEnvironmentId() {
  576. return this.$store.state.user.info.clientEnvironmentId;
  577. },
  578. columns() {
  579. let columnsVersion = this.columnsVersion;
  580. return [
  581. {
  582. width: 60,
  583. type: 'index',
  584. columnKey: 'index',
  585. align: 'center',
  586. fixed: 'left'
  587. },
  588. {
  589. minWidth: 150,
  590. prop: 'orderNo',
  591. label: '订单编码',
  592. align: 'center',
  593. fixed: 'left'
  594. },
  595. {
  596. width: 200,
  597. prop: 'productName',
  598. label: '名称',
  599. slot: 'productName',
  600. align: 'center'
  601. },
  602. {
  603. width: 120,
  604. prop: 'productCode',
  605. label: '编码',
  606. slot: 'productCode',
  607. align: 'center'
  608. },
  609. {
  610. width: 200,
  611. prop: 'productCategoryName',
  612. label: '类型',
  613. slot: 'productCategoryName',
  614. align: 'center'
  615. },
  616. {
  617. width: 160,
  618. prop: 'batchStockId',
  619. label: '批次号',
  620. slot: 'batchStockId',
  621. align: 'center'
  622. },
  623. {
  624. width: 160,
  625. prop: 'productBrand',
  626. label: '牌号',
  627. slot: 'productBrand',
  628. align: 'center'
  629. },
  630. {
  631. width: 120,
  632. prop: 'modelType',
  633. label: '型号',
  634. slot: 'modelType',
  635. align: 'center'
  636. },
  637. {
  638. width: 120,
  639. prop: 'specification',
  640. label: '规格',
  641. slot: 'specification',
  642. align: 'center'
  643. },
  644. {
  645. width: 160,
  646. prop: 'modelKey',
  647. label: '机型',
  648. slot: 'modelKey',
  649. align: 'center'
  650. },
  651. {
  652. width: 160,
  653. prop: 'colorKey',
  654. label: '颜色',
  655. slot: 'colorKey',
  656. align: 'center'
  657. },
  658. {
  659. minWidth: 160,
  660. prop: 'productionCodes',
  661. label: '生产编号',
  662. align: 'center',
  663. slot: 'productionCodes'
  664. },
  665. {
  666. minWidth: 280,
  667. prop: 'productionRequirements',
  668. label: '生产要求',
  669. align: 'center'
  670. },
  671. {
  672. minWidth: 120,
  673. prop: 'goodsLevel',
  674. label: '物品级别',
  675. formatter: (_row, _column, cellValue) => {
  676. return levelList.find((item) => item.value == _row.goodsLevel)
  677. ?.label;
  678. },
  679. align: 'center'
  680. },
  681. ...this.dynamicsColumns,
  682. {
  683. width: 120,
  684. prop: 'customerMark',
  685. label: '客户代号',
  686. slot: 'customerMark',
  687. align: 'center'
  688. },
  689. {
  690. width: 200,
  691. prop: 'warehouseId',
  692. label: '仓库名称',
  693. slot: 'warehouseId',
  694. headerSlot: 'headerWarehouseId',
  695. align: 'center'
  696. },
  697. {
  698. width: 100,
  699. prop: 'warehouseNum',
  700. label: '库存',
  701. align: 'center',
  702. slot: 'warehouseNum'
  703. },
  704. // {
  705. // width: 100,
  706. // prop: 'stockLedger',
  707. // label: '发货明细',
  708. // slot: 'stockLedger',
  709. // align: 'center'
  710. // },
  711. {
  712. width: 250,
  713. prop: 'saleCount',
  714. label: '发货数量',
  715. slot: 'saleCount',
  716. headerSlot: 'headerTotalCount',
  717. align: 'center'
  718. },
  719. {
  720. width: 100,
  721. prop: 'notSendTotalCount',
  722. label: '未发数量',
  723. align: 'center',
  724. formatter: (row, column) => {
  725. if (row.notSendTotalCount) {
  726. return row.notSendTotalCount + ' ' + row.measuringUnit;
  727. }
  728. }
  729. },
  730. // {
  731. // width: 150,
  732. // prop: 'saleUnit',
  733. // label: '单位',
  734. // slot: 'saleUnit',
  735. // align: 'center'
  736. // },
  737. {
  738. width: 120,
  739. prop: 'packingSpecification',
  740. align: 'center',
  741. label: '包装规格',
  742. showOverflowTooltip: true
  743. },
  744. {
  745. width: 120,
  746. prop: 'totalCount',
  747. label: '计量数量',
  748. formatter: (row, column) => {
  749. if (row.totalCount) {
  750. return row.totalCount + ' ' + row.measuringUnit;
  751. }
  752. },
  753. align: 'center'
  754. },
  755. {
  756. width: 120,
  757. prop: 'orderTotalCount',
  758. label: '订单数量',
  759. formatter: (row, column) => {
  760. if (row.orderTotalCount) {
  761. return row.orderTotalCount + ' ' + row.measuringUnit;
  762. }
  763. },
  764. align: 'center'
  765. },
  766. // {
  767. // width: 80,
  768. // prop: 'measuringUnit',
  769. // label: '计量单位',
  770. // slot: 'measuringUnit',
  771. // align: 'center'
  772. // },
  773. this.clientEnvironmentId == 4
  774. ? {
  775. width: 150,
  776. prop: 'blockCount',
  777. label: '发货块数',
  778. slot: 'blockCount',
  779. align: 'center'
  780. }
  781. : { width: 1 },
  782. {
  783. width: 200,
  784. prop: 'singleWeight',
  785. slot: 'singleWeight',
  786. label: '单重',
  787. align: 'center'
  788. },
  789. {
  790. width: 250,
  791. prop: 'receiveTotalWeight',
  792. label: '收货总重',
  793. slot: 'receiveTotalWeight',
  794. align: 'center',
  795. headerSlot: 'headerReceiveTotalWeight'
  796. },
  797. {
  798. width: 220,
  799. prop: 'sendTotalWeight',
  800. label: '发货总重',
  801. slot: 'sendTotalWeight',
  802. align: 'center'
  803. },
  804. {
  805. width: 220,
  806. prop: 'increaseTotalWeight',
  807. label: '增重重量',
  808. slot: 'increaseTotalWeight',
  809. align: 'center'
  810. },
  811. {
  812. width: 180,
  813. prop: 'singlePrice',
  814. label: '单价',
  815. slot: 'singlePrice',
  816. align: 'center'
  817. },
  818. {
  819. width: 160,
  820. prop: 'taxRate',
  821. label: '税率',
  822. formatter: (_row, _column, cellValue) => {
  823. return _row.taxRate ? _row.taxRate + '%' : '';
  824. },
  825. align: 'center'
  826. },
  827. {
  828. width: 180,
  829. prop: 'notaxSinglePrice',
  830. label: '不含税单价',
  831. align: 'center'
  832. },
  833. {
  834. width: 160,
  835. prop: 'discountSinglePrice',
  836. label: '折后单价',
  837. slot: 'discountSinglePrice',
  838. align: 'center'
  839. },
  840. {
  841. width: 120,
  842. prop: 'totalPrice',
  843. label: '合计',
  844. slot: 'totalPrice',
  845. align: 'center'
  846. },
  847. {
  848. width: 160,
  849. prop: 'notaxTotalPrice',
  850. label: '含税合计',
  851. align: 'center'
  852. },
  853. {
  854. width: 120,
  855. prop: 'discountTotalPrice',
  856. label: '折后合计',
  857. slot: 'discountTotalPrice',
  858. align: 'center'
  859. },
  860. {
  861. width: 120,
  862. prop: 'imgCode',
  863. align: 'center',
  864. label: '图号/件号',
  865. showOverflowTooltip: true
  866. },
  867. {
  868. width: 120,
  869. prop: 'produceType',
  870. align: 'center',
  871. label: '属性类型',
  872. formatter: (row, column) => {
  873. if (row.produceType) {
  874. return row.produceType
  875. .map((item) => {
  876. return lbjtList[item];
  877. })
  878. .toString();
  879. }
  880. },
  881. showOverflowTooltip: true
  882. },
  883. {
  884. width: 200,
  885. prop: 'guaranteePeriod',
  886. label: '有效期',
  887. slot: 'guaranteePeriod',
  888. formatter: (_row, _column, cellValue) => {
  889. let val = '';
  890. if (_row.guaranteePeriod) {
  891. val += _row.guaranteePeriod;
  892. }
  893. if (_row.guaranteePeriodUnitName) {
  894. val += _row.guaranteePeriodUnitName;
  895. }
  896. return val;
  897. },
  898. align: 'center'
  899. },
  900. {
  901. width: 200,
  902. prop: 'guaranteePeriodDeadline',
  903. label: '有效期截止日期',
  904. slot: 'guaranteePeriodDeadline',
  905. align: 'center'
  906. },
  907. {
  908. prop: 'provenance',
  909. label: '产地',
  910. slot: 'provenance',
  911. align: 'center',
  912. // show:this.contractBookType==2,
  913. minWidth: 200,
  914. showOverflowTooltip: true,
  915. formatter: (row, column) => {
  916. return row.provenance && row.provenance.length
  917. ? row.provenance
  918. .map((item) => this.getDictValue('产地', item))
  919. .join(',')
  920. : '';
  921. }
  922. },
  923. {
  924. width: 130,
  925. prop: 'technicalAnswerName',
  926. label: '技术答疑人',
  927. slot: 'technicalAnswerName',
  928. align: 'center'
  929. },
  930. {
  931. width: 220,
  932. prop: 'technicalParams',
  933. label: '技术参数',
  934. slot: 'technicalParams',
  935. align: 'center'
  936. },
  937. {
  938. width: 240,
  939. prop: 'technicalDrawings',
  940. label: '技术图纸',
  941. slot: 'technicalDrawings',
  942. align: 'center'
  943. },
  944. {
  945. width: 220,
  946. prop: 'remark',
  947. label: '备注',
  948. slot: 'remark',
  949. align: 'center'
  950. },
  951. {
  952. columnKey: 'action',
  953. label: '操作',
  954. width: 200,
  955. align: 'center',
  956. resizable: false,
  957. slot: 'action',
  958. fixed: 'right',
  959. showOverflowTooltip: true
  960. }
  961. ];
  962. }
  963. },
  964. mounted() {
  965. // this.clientEnvironmentId =
  966. },
  967. methods: {
  968. // 挂起/取消挂起功能
  969. async pending(row) {
  970. console.log('pending~~~', row)
  971. // 取消挂起不需要二次确认
  972. this.$set(row, 'isSuspend', 0);
  973. this.$forceUpdate();
  974. this.current['offsetDetail'] = [];
  975. this.current['isSuspend'] = 0;
  976. this.$set(this.current, 'warehouseList', await getIdWarehouseList({
  977. categoryId: this.current.id
  978. }))
  979. this.$set(this.current, 'warehouseId', '')
  980. },
  981. // 通过挂起状态设置行样式
  982. tableRowClassName({row}) {
  983. // console.log('tableRowClassName', row)
  984. if (row.isSuspend == 1) {
  985. return 'warning-row';
  986. }
  987. return '';
  988. },
  989. // 挂起选择库存
  990. pendingReplaceTable(row, index) {
  991. // console.log('handleWarehouseClick', row, index)
  992. this.current = row;
  993. this.$refs.selectStockLedgerDialogPendingRef.open(row, index)
  994. },
  995. pendingReplaceTableConfirm(list) {
  996. console.log('confirm', list)
  997. list.forEach((item) => {
  998. item.warehouseList =[{
  999. warehouseName: item.warehouseName,
  1000. warehouseId: item.warehouseId,
  1001. }]
  1002. });
  1003. this.$set(this.current, 'warehouseList', list[0].warehouseList)
  1004. this.$set(this.current, 'warehouseId', list[0].warehouseId)
  1005. this.$set(this.current, 'warehouseNum', list[0].measureQuantity)
  1006. this.current['offsetDetail'] = list
  1007. this.$set(this.current, 'isSuspend', 1)
  1008. console.log('current', this.current)
  1009. // this.$emit('pendingReplaceTableConfirm', list);
  1010. // this.$emit('replaceTableChange', list);
  1011. // console.log('pendingReplaceTableConfirm', list)
  1012. },
  1013. getSummaries(param) {
  1014. if (this.clientEnvironmentId != 4) {
  1015. return;
  1016. }
  1017. return getSummaries(
  1018. param,
  1019. ['saleCount', 'blockCount', 'totalCount'],
  1020. ' '
  1021. );
  1022. },
  1023. downloadFile(file) {
  1024. getFile({ objectName: file.storePath }, file.name);
  1025. },
  1026. //发货明细选择
  1027. stockLedgerSelect(row, index) {
  1028. this.curIndex = index;
  1029. this.stockLedgerDialogFlag = true;
  1030. this.$nextTick(() => {
  1031. this.$refs.stockLedgerDialogRef.init(row.sendProductDetail, row);
  1032. });
  1033. },
  1034. // changeCount1(row, index) {
  1035. // this.tableHandleKeyUp(row, index, 'sum');
  1036. // this.changeCount(row, index);
  1037. // },
  1038. packingChange(item, index) {
  1039. this.$set(this.form.datasource[index], 'saleUnit', item.conversionUnit);
  1040. },
  1041. //改变数量
  1042. // changeCount() {
  1043. // this.form.datasource.forEach((item, index) => {
  1044. // if (item.pricingWay == 1) {
  1045. // this.$set(
  1046. // this.form.datasource[index],
  1047. // 'discountTotalPrice',
  1048. // item.discountSinglePrice * item.totalCount
  1049. // );
  1050. // this.$set(
  1051. // this.form.datasource[index],
  1052. // 'totalPrice',
  1053. // item.singlePrice * item.totalCount
  1054. // );
  1055. // }
  1056. // if (item.pricingWay == 2) {
  1057. // this.$set(
  1058. // this.form.datasource[index],
  1059. // 'discountTotalPrice',
  1060. // item.discountSinglePrice *
  1061. // item.totalCount *
  1062. // (item.singleWeight || 0)
  1063. // );
  1064. // this.$set(
  1065. // this.form.datasource[index],
  1066. // 'totalPrice',
  1067. // item.singlePrice * item.totalCount * (item.singleWeight || 0)
  1068. // );
  1069. // }
  1070. // });
  1071. // },
  1072. //获取
  1073. getStockLedger(sendProductDetail) {
  1074. if (!this.form.datasource[this.curIndex].sendProductDetail)
  1075. this.form.datasource[this.curIndex].sendProductDetail = [];
  1076. let row = this.form.datasource[this.curIndex];
  1077. row.sendProductDetail.push(...sendProductDetail);
  1078. this.form.datasource[this.curIndex] = row;
  1079. this.$refs['childrenTable' + this.curIndex].reload();
  1080. this.$refs.table.reload();
  1081. },
  1082. //删除发货明细
  1083. stockLedgerRemove(PIndex) {
  1084. let row = this.form.datasource[PIndex];
  1085. this.selection.forEach((item) => {
  1086. let index = row.sendProductDetail.findIndex((i) => i.id == item.id);
  1087. row.sendProductDetail.splice(index, 1);
  1088. });
  1089. this.form.datasource[PIndex] = row;
  1090. this.$refs['childrenTable' + PIndex].reload();
  1091. this.$refs.table.reload();
  1092. this.selection = [];
  1093. },
  1094. async warehouseChange(index, row, isReset = false) {
  1095. const data = row.warehouseList.find(
  1096. (item) => item.warehouseId == row.warehouseId
  1097. );
  1098. this.$set(
  1099. this.form.datasource[index],
  1100. 'warehouseName',
  1101. data.warehouseName
  1102. );
  1103. this.$set(
  1104. this.form.datasource[index],
  1105. 'warehouseCode',
  1106. data.warehouseCode
  1107. );
  1108. const warehouseOutStock = await getWarehouseOutStock({
  1109. warehouseId: data.warehouseId,
  1110. code: row.productCode
  1111. });
  1112. this.$set(
  1113. this.form.datasource[index],
  1114. 'warehouseNum',
  1115. warehouseOutStock || 0
  1116. );
  1117. if(isReset) {
  1118. this.$set(this.form.datasource[index], 'batchStockId', '');
  1119. this.$set(this.form.datasource[index], 'batchNo', '');
  1120. }
  1121. },
  1122. //批次号选择
  1123. async batchNoChange(index, row) {
  1124. if(!row.batchStockId) {
  1125. this.$set(this.form.datasource[index], 'batchNo', '');
  1126. this.$set(this.form.datasource[index], 'warehouseNum', '');
  1127. const tempWarehouse = await getIdWarehouseList({
  1128. categoryId: this.form.datasource[index].productId,
  1129. })
  1130. // 有仓库列表
  1131. if (tempWarehouse?.length) {
  1132. console.log('666~~~~!!', index, tempWarehouse);
  1133. this.$set(
  1134. this.form.datasource[index],
  1135. 'warehouseList',
  1136. tempWarehouse
  1137. );
  1138. }
  1139. return;
  1140. }
  1141. const data = row.batchNoList.find(
  1142. (item) => item.id == row.batchStockId
  1143. );
  1144. this.$set(this.form.datasource[index], 'batchNo', data.batchNo);
  1145. this.$set(
  1146. this.form.datasource[index],
  1147. 'warehouseNum',
  1148. data.measureQuantity || 0
  1149. );
  1150. },
  1151. //改变数量
  1152. changeCount(row, index, isBlockCount = true) {
  1153. this.$set(
  1154. this.form,
  1155. 'datasource[' + index + ']',
  1156. changeCount(row, {
  1157. countKey: 'saleCount',
  1158. unitKey: 'saleUnit',
  1159. unitIdKey: 'saleUnitId'
  1160. })
  1161. );
  1162. this.$set(
  1163. this.form.datasource[index],
  1164. 'sendTotalWeight',
  1165. this.form.datasource[index].totalWeight
  1166. );
  1167. this.changeSendTotalWeight(row, index);
  1168. this.getNotaxSinglePrice();
  1169. this.$forceUpdate();
  1170. if (this.clientEnvironmentId == 4 && !isBlockCount) {
  1171. this.tableHandleKeyUp(row, index, 'sum');
  1172. }
  1173. },
  1174. //修改发货总重
  1175. changeSendTotalWeight(row, index) {
  1176. this.curIndex = index;
  1177. this.setIcreaseTotalWeight(row);
  1178. },
  1179. keyChange(index, row, key) {
  1180. this.$set(
  1181. this.form.datasource[index],
  1182. 'extField.' + key,
  1183. row.extField[key]
  1184. );
  1185. this.$forceUpdate();
  1186. },
  1187. //设置增重总重
  1188. setIcreaseTotalWeight(row) {
  1189. let receiveTotalWeight = Number(
  1190. this.form.datasource[this.curIndex]?.receiveTotalWeight
  1191. );
  1192. let sendTotalWeight = Number(
  1193. this.form.datasource[this.curIndex]?.sendTotalWeight
  1194. );
  1195. if (sendTotalWeight && receiveTotalWeight) {
  1196. this.$set(
  1197. this.form.datasource[this.curIndex],
  1198. 'increaseTotalWeight',
  1199. (sendTotalWeight - receiveTotalWeight).toFixed(2)
  1200. );
  1201. }
  1202. this.$refs.table.reload();
  1203. this.$forceUpdate();
  1204. },
  1205. //计算不含税单价
  1206. getNotaxSinglePrice() {
  1207. this.form.datasource.forEach((item, index) => {
  1208. if (item.singlePrice && item.taxRate) {
  1209. this.$set(
  1210. this.form.datasource[index],
  1211. 'notaxSinglePrice',
  1212. parseFloat(
  1213. (item.singlePrice / (1 + item.taxRate / 100)).toFixed(2)
  1214. )
  1215. );
  1216. } else {
  1217. this.$set(this.form.datasource[index], 'notaxSinglePrice', '');
  1218. }
  1219. });
  1220. },
  1221. //入库单详情
  1222. handleInnerBound(e, rows, index) {
  1223. this.curIndex = index;
  1224. this.innerboundDetailsDialogFlag = true;
  1225. this.$nextTick(() => {
  1226. let row = {
  1227. code: this.entrustedCode
  1228. };
  1229. this.$refs.innerboundDetailsDialogRef.init(row);
  1230. });
  1231. },
  1232. //选择入库单信息
  1233. saveInnerDate(data = []) {
  1234. let totalWeight = data.reduce((num, row) => {
  1235. num += Number(row.weight);
  1236. return num;
  1237. }, 0);
  1238. this.$set(
  1239. this.form.datasource[this.curIndex],
  1240. 'receiveTotalWeight',
  1241. totalWeight
  1242. );
  1243. console.log(totalWeight, 'totalWeight');
  1244. this.setIcreaseTotalWeight(this.form.datasource[this.curIndex]);
  1245. },
  1246. // getWeightPrice() {
  1247. // let increaseTotalWeight =
  1248. // this.form.datasource[this.curIndex].increaseTotalWeight;
  1249. // let singlePrice = this.form.datasource[this.curIndex].singlePrice;
  1250. // let discountSinglePrice =
  1251. // this.form.datasource[this.curIndex].discountSinglePrice;
  1252. // this.$set(
  1253. // this.form.datasource[this.curIndex],
  1254. // 'totalPrice',
  1255. // (Number(increaseTotalWeight) * Number(singlePrice)).toFixed(2)
  1256. // );
  1257. // this.$set(
  1258. // this.form.datasource[this.curIndex],
  1259. // 'discountTotalPrice',
  1260. // (Number(discountSinglePrice) * Number(increaseTotalWeight)).toFixed(2)
  1261. // );
  1262. // },
  1263. // 表格:模数、数量(方)、块数输入框 输入事件
  1264. tableHandleKeyUp(row, index, name) {
  1265. if (row.specification) {
  1266. let modelArr = row.specification.split('*');
  1267. let modelLong = modelArr[0]; // model规格长度
  1268. let modeWide = modelArr[1]; // model规格宽度
  1269. let modeHight = modelArr[2].substr(0, modelArr[2].indexOf('cm')); // model规格高度
  1270. modeHight = Number(modeHight);
  1271. if (name === 'sum') {
  1272. row.blockCount = Math.floor(
  1273. row.totalCount / ((modelLong * modeWide * modeHight) / 1000000)
  1274. );
  1275. } else if (name === 'blockCount') {
  1276. row.totalCount =
  1277. (Number(row.blockCount) * modelLong * modeWide * modeHight) /
  1278. 1000000;
  1279. row.saleCount = row.totalCount;
  1280. this.changeCount(row, index, true);
  1281. }
  1282. }
  1283. },
  1284. //选择产品回调
  1285. async changeParent(obj) {
  1286. console.log(obj, 'obj');
  1287. obj.forEach((item) => {
  1288. item.orderTotalCount = item.totalCount;
  1289. item.id = '';
  1290. });
  1291. this.putTableValue(copyObj(obj));
  1292. },
  1293. //选择产品回调
  1294. changeParentBiz(obj = [], idx) {
  1295. obj.forEach(async (item, index) => {
  1296. let i = idx == -1 ? index : idx;
  1297. let row = JSON.parse(JSON.stringify(this.defaultForm));
  1298. row.key = this.form.datasource.length + 1;
  1299. row['tempId'] = this.form.datasource.length + 1;
  1300. let parasm = idx == -1 ? row : this.form.datasource[i];
  1301. this.$set(parasm, 'productId', item.id);
  1302. this.$set(parasm, 'categoryName', item.name);
  1303. this.$set(parasm, 'productCategoryId', item.categoryLevelId);
  1304. this.$set(parasm, 'productBrand', item.brandNum);
  1305. this.$set(parasm, 'productCategoryName', item.categoryLevelPath);
  1306. this.$set(parasm, 'productCode', item.code);
  1307. this.$set(parasm, 'productName', item.name);
  1308. this.$set(parasm, 'modelType', item.modelType);
  1309. this.$set(parasm, 'availableCountBase', item.availableCountBase);
  1310. this.$set(parasm, 'measuringUnit', item.measuringUnit);
  1311. this.$set(parasm, 'specification', item.specification);
  1312. this.$set(parasm, 'weightUnit', item.weightUnit);
  1313. this.$set(parasm, 'imgCode', item.imgCode);
  1314. this.$set(parasm, 'produceType', item.componentAttribute);
  1315. this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
  1316. this.$set(parasm, 'extField', item.extField || {});
  1317. this.$set(parasm, 'singleWeight', item.netWeight);
  1318. this.$set(parasm, 'pricingWay', item.pricingWay || 1);
  1319. this.$set(parasm, 'singlePrice', 0);
  1320. this.$set(parasm, 'discountSinglePrice', 0);
  1321. this.$set(parasm, 'goodsLevel', item.goodsLevel);
  1322. if (item.modelKey) {
  1323. this.$set(parasm, 'modelKey', item.modelKey.split(','));
  1324. }
  1325. if (item.colorKey) {
  1326. this.$set(parasm, 'colorKey', item.colorKey.split(','));
  1327. }
  1328. this.$set(parasm, 'receiveTotalWeight', 0);
  1329. this.$set(parasm, 'sendTotalWeight', 0);
  1330. this.$set(parasm, 'increaseTotalWeight', 0);
  1331. this.$set(
  1332. parasm,
  1333. 'packageDispositionList',
  1334. item.packageDispositionList
  1335. );
  1336. if (item.packageDispositionList?.length) {
  1337. this.$set(parasm, 'saleUnitId', item.packageDispositionList[0].id);
  1338. this.$set(
  1339. parasm,
  1340. 'saleUnit',
  1341. item.packageDispositionList[0].conversionUnit
  1342. );
  1343. }
  1344. this.$set(
  1345. parasm,
  1346. 'warehouseList',
  1347. await getIdWarehouseList({
  1348. categoryId: item.id
  1349. })
  1350. );
  1351. this.$set(
  1352. parasm,
  1353. 'batchNoList',
  1354. await getBatchList({
  1355. categoryCode: item.productCode,
  1356. warehouseId: item.warehouseId,
  1357. size: -1
  1358. })
  1359. );
  1360. this.$set(
  1361. parasm,
  1362. 'packingSpecification',
  1363. item.extField?.packingSpecification
  1364. );
  1365. this.$set(
  1366. parasm,
  1367. 'supplierMark',
  1368. this.form.datasource[0]?.supplierMark
  1369. );
  1370. if (item.purchaseOrigins?.length > 0) {
  1371. item.purchaseOrigins = item.purchaseOrigins.map((val) => val + '');
  1372. }
  1373. this.$set(parasm, 'provenance', item.purchaseOrigins || []);
  1374. if (idx == -1) {
  1375. this.form.datasource.push(row);
  1376. }
  1377. });
  1378. },
  1379. replaceTable(list) {
  1380. list.forEach((item) => {
  1381. item['relationId'] = this.current.tempId;
  1382. });
  1383. this.$emit('replaceTableChange', list);
  1384. },
  1385. // validateTotalCount(row) {
  1386. // return (rule, value, callback) => {
  1387. // if (isNaN(value) || Number(value) <= 0) {
  1388. // this.$message.error('请输入大于0的数');
  1389. // callback(false);
  1390. // } else else {
  1391. // callback();
  1392. // }
  1393. // };
  1394. // },
  1395. // 返回列表数据
  1396. getTableValue() {
  1397. let comitDatasource = this.form.datasource;
  1398. if (comitDatasource.length === 0) return [];
  1399. comitDatasource.forEach(async (v) => {
  1400. if (v.modelKey) {
  1401. v.modelKey = v.modelKey.toString();
  1402. }
  1403. if (v.colorKey) {
  1404. v.colorKey = v.colorKey.toString();
  1405. }
  1406. v.totalCount = Number(v.totalCount);
  1407. v.technicalDrawings = Array.isArray(v.technicalDrawings)
  1408. ? v.technicalDrawings
  1409. : [];
  1410. v.customerReqFiles = Array.isArray(v.customerReqFiles)
  1411. ? v.customerReqFiles
  1412. : [];
  1413. v.industryArtFiles = v.industryArtFiles || [];
  1414. v.otherFiles = v.otherFiles || [];
  1415. });
  1416. return comitDatasource;
  1417. },
  1418. getPrice() {
  1419. return [this.allPrice];
  1420. },
  1421. //修改回显
  1422. putTableValue(data, isInit) {
  1423. if (isInit) {
  1424. this.form.datasource = [];
  1425. }
  1426. if (data) {
  1427. this.setValue(data);
  1428. }
  1429. },
  1430. setValue(data) {
  1431. console.log('setValue~~~~~~', data);
  1432. let indexS = [];
  1433. data.forEach((item, index) => {
  1434. if (item.modelKey) {
  1435. this.$set(data[index], 'modelKey', item.modelKey.split(','));
  1436. }
  1437. if (item.colorKey) {
  1438. this.$set(data[index], 'colorKey', item.colorKey.split(','));
  1439. }
  1440. item.receiveTotalWeight = item.receiveTotalWeight || 0;
  1441. if (item.weightUnit == item.measuringUnit) {
  1442. item.sendTotalWeight = item.sendTotalWeight || item.totalCount;
  1443. } else {
  1444. item.sendTotalWeight =
  1445. item.sendTotalWeight ||
  1446. Number(item.totalCount) * Number(item.singleWeight) ||
  1447. 0;
  1448. }
  1449. if (this.outsourceSendCode) {
  1450. item.increaseTotalWeight =
  1451. Number(item.receiveTotalWeight) - Number(item.sendTotalWeight);
  1452. item.increaseTotalWeight;
  1453. } else {
  1454. item.increaseTotalWeight =
  1455. item.increaseTotalWeight || item.receiveTotalWeight || 0;
  1456. }
  1457. item['sendTotalWeight'] = item.sendTotalWeigh;
  1458. item['increaseTotalWeight'] = item.increaseTotalWeight;
  1459. item['tempId'] = this.form.datasource.length;
  1460. indexS.push(this.form.datasource.length);
  1461. this.$set(
  1462. this.form.datasource,
  1463. this.form.datasource.length,
  1464. copyObj(item)
  1465. );
  1466. // this.form.datasource.push(item);
  1467. });
  1468. this.form.datasource.forEach(async (item, index) => {
  1469. if (indexS.includes(index)) {
  1470. if(!item.batchNo) {
  1471. console.log('111~~~~', index);
  1472. this.$set(
  1473. this.form.datasource[index],
  1474. 'warehouseList',
  1475. await getIdWarehouseList({
  1476. categoryId: item.productId
  1477. })
  1478. );
  1479. if (item.warehouseId) {
  1480. this.$set(
  1481. this.form.datasource[index],
  1482. 'warehouseNum',
  1483. item.stockNum ? item.stockNum : await getWarehouseOutStock({
  1484. warehouseId: item.warehouseId,
  1485. code: item.productCode
  1486. })
  1487. );
  1488. } else if (this.form.datasource[index]?.warehouseList?.length) {
  1489. this.$set(
  1490. this.form.datasource[index],
  1491. 'warehouseId',
  1492. this.form.datasource[index]?.warehouseList[0].warehouseId
  1493. );
  1494. await this.warehouseChange(index, this.form.datasource[index]);
  1495. }
  1496. const templist = await getBatchList({
  1497. categoryCode: item.productCode,
  1498. warehouseId: item.warehouseId,
  1499. size: -1
  1500. });
  1501. console.log('templist~~~~', index, templist.list);
  1502. // 批次号
  1503. this.$set(
  1504. this.form.datasource[index],
  1505. 'batchNoList',
  1506. templist?.list || []
  1507. );
  1508. // console.log(this.form.datasource[index]);
  1509. } else {
  1510. this.setBatchAndWarehouse(item, index);
  1511. }
  1512. }
  1513. });
  1514. },
  1515. async setBatchAndWarehouse(item, index) {
  1516. console.log('333~~~~', index);
  1517. // 通过产品编码查仓库
  1518. const tempWarehouse = await getIdWarehouseList({
  1519. categoryId: item.productId,
  1520. })
  1521. // 有仓库列表
  1522. if (tempWarehouse?.length) {
  1523. console.log('666~~~~', index, tempWarehouse);
  1524. this.$set(
  1525. this.form.datasource[index],
  1526. 'warehouseList',
  1527. tempWarehouse
  1528. );
  1529. if (item.warehouseId) {
  1530. this.$set(
  1531. this.form.datasource[index],
  1532. 'warehouseNum',
  1533. item.stockNum ? item.stockNum : await getWarehouseOutStock({
  1534. warehouseId: item.warehouseId,
  1535. code: item.productCode
  1536. })
  1537. );
  1538. } else {
  1539. if (this.form.datasource[index]?.warehouseList?.length) {
  1540. this.$set(
  1541. this.form.datasource[index],
  1542. 'warehouseId',
  1543. this.form.datasource[index]?.warehouseList[0].warehouseId
  1544. );
  1545. await this.warehouseChange(index, this.form.datasource[index]);
  1546. }
  1547. }
  1548. const templist1 = await getBatchList({
  1549. categoryCode: item.productCode,
  1550. warehouseId: item.warehouseId,
  1551. size: -1
  1552. });
  1553. let tempBatchNoList = templist1?.list || [];
  1554. console.log('888~~~~', index, item.batchNo);
  1555. const batchNoObj = tempBatchNoList.find(i => i.batchNo == item.batchNo);
  1556. if(batchNoObj) {
  1557. this.$set(
  1558. this.form.datasource[index],
  1559. 'batchStockId',
  1560. batchNoObj.id
  1561. );
  1562. this.$set(
  1563. this.form.datasource[index],
  1564. 'warehouseNum',
  1565. item.stockNum ? item.stockNum : batchNoObj.measureQuantity || 0
  1566. );
  1567. } else { //不存在
  1568. // 批次列表添加不存在的批次号对象
  1569. tempBatchNoList.push({
  1570. batchNo: item.batchNo,
  1571. id: 999,
  1572. measureQuantity: 0
  1573. })
  1574. // 设置为不存在的批次ID
  1575. this.$set(
  1576. this.form.datasource[index],
  1577. 'batchStockId',
  1578. 999
  1579. );
  1580. this.$set(
  1581. this.form.datasource[index],
  1582. 'warehouseNum',
  1583. item.stockNum ? item.stockNum : ''
  1584. );
  1585. }
  1586. // // 批次号
  1587. this.$set(
  1588. this.form.datasource[index],
  1589. 'batchNoList',
  1590. tempBatchNoList
  1591. );
  1592. } else {
  1593. if(item.batchNo) {
  1594. const tempBatchNoList = [{
  1595. batchNo: item.batchNo,
  1596. id: 999,
  1597. measureQuantity: 0
  1598. }]
  1599. this.$set(
  1600. this.form.datasource[index],
  1601. 'batchNoList',
  1602. tempBatchNoList
  1603. );
  1604. this.$set(
  1605. this.form.datasource[index],
  1606. 'batchStockId',
  1607. 999
  1608. );
  1609. this.$set(
  1610. this.form.datasource[index],
  1611. 'warehouseNum',
  1612. item.stockNum ? item.stockNum : ''
  1613. );
  1614. }
  1615. }
  1616. },
  1617. async setBatchAndWarehouse1(item, index) {
  1618. // 通过产品编号和批次号获取仓库列表
  1619. const warehouse = await getIdWarehouseList({
  1620. categoryId: item.productId,
  1621. // batchNo: item.batchNo
  1622. })
  1623. // 如果有仓库列表
  1624. if (warehouse?.length) {
  1625. console.log('222~~~~', index, item.batchNo);
  1626. // 设置仓库列表
  1627. this.$set(
  1628. this.form.datasource[index],
  1629. 'warehouseList',
  1630. warehouse
  1631. );
  1632. // 如果有仓库ID
  1633. if (item.warehouseId) {
  1634. // console.log('444~~~~');
  1635. // const templist = await getBatchList({
  1636. // categoryCode: item.productCode,
  1637. // warehouseId: item.warehouseId,
  1638. // size: -1
  1639. // });
  1640. // const batchNoList = templist?.list || [];
  1641. // // 批次号
  1642. // this.$set(
  1643. // this.form.datasource[index],
  1644. // 'batchNoList',
  1645. // batchNoList
  1646. // );
  1647. // const batchNo = batchNoList.find(i => i.batchNo === item.batchNo);
  1648. // if (batchNo) {
  1649. // this.$set(
  1650. // this.form.datasource[index],
  1651. // 'batchStockId',
  1652. // batchNo.id
  1653. // );
  1654. // this.$set(
  1655. // this.form.datasource[index],
  1656. // 'warehouseNum',
  1657. // data.measureQuantity || 0
  1658. // );
  1659. // }
  1660. }
  1661. // 没有仓库ID,设置第一个仓库ID
  1662. else {
  1663. if (this.form.datasource[index]?.warehouseList?.length){
  1664. console.log('555~~~~', index);
  1665. this.$set(
  1666. this.form.datasource[index],
  1667. 'warehouseId',
  1668. this.form.datasource[index]?.warehouseList[0].warehouseId
  1669. );
  1670. // await this.warehouseChange(index, this.form.datasource[index]);
  1671. }
  1672. }
  1673. // const wdata = warehouse.find(
  1674. // (i) => i.warehouseId == row.warehouseId
  1675. // );
  1676. // this.$set(
  1677. // this.form.datasource[index],
  1678. // 'warehouseName',
  1679. // wdata.warehouseName
  1680. // );
  1681. // this.$set(
  1682. // this.form.datasource[index],
  1683. // 'warehouseCode',
  1684. // wdata.warehouseCode
  1685. // );
  1686. // const warehouseOutStock = await getWarehouseOutStock({
  1687. // warehouseId: wdata.warehouseId,
  1688. // code: row.productCode
  1689. // });
  1690. // this.$set(
  1691. // this.form.datasource[index],
  1692. // 'warehouseNum',
  1693. // warehouseOutStock || 0
  1694. // );
  1695. console.log('444~~~~');
  1696. // 通过仓库ID获取批次号列表
  1697. const templist = await getBatchList({
  1698. categoryCode: item.productCode,
  1699. warehouseId: item.warehouseId,
  1700. size: -1
  1701. });
  1702. let batchNoList = templist?.list || [];
  1703. console.log('batchNoList~~~~', index, batchNoList);
  1704. // 设置批次列表
  1705. this.$set(
  1706. this.form.datasource[index],
  1707. 'batchNoList',
  1708. batchNoList
  1709. );
  1710. // 查找批次号是否存在批次列表
  1711. const batchNo = batchNoList.find(i => i.batchNo == item.batchNo);
  1712. console.log('batchNo~~~~', index, batchNo);
  1713. // 存在
  1714. if (batchNo) {
  1715. // 设置批次ID
  1716. this.$set(
  1717. this.form.datasource[index],
  1718. 'batchStockId',
  1719. batchNo.id
  1720. );
  1721. // 设置批次库存
  1722. this.$set(
  1723. this.form.datasource[index],
  1724. 'warehouseNum',
  1725. batchNo.measureQuantity || 0
  1726. );
  1727. } else { //不存在
  1728. // 批次列表添加不存在的批次号对象
  1729. batchNoList = batchNoList.push({
  1730. batchNo: item.batchNo,
  1731. id: 999,
  1732. measureQuantity: 0
  1733. })
  1734. // 设置为不存在的批次ID
  1735. this.$set(
  1736. this.form.datasource[index],
  1737. 'batchStockId',
  1738. 999
  1739. );
  1740. this.$set(
  1741. this.form.datasource[index],
  1742. 'warehouseNum',
  1743. ''
  1744. );
  1745. }
  1746. }
  1747. // 如果没有仓库列表
  1748. else {
  1749. console.log('333~~~~', index);
  1750. // 通过产品编码查仓库
  1751. const tempWarehouse = await getIdWarehouseList({
  1752. categoryId: item.productId,
  1753. })
  1754. // 有仓库列表
  1755. if (tempWarehouse?.length) {
  1756. console.log('666~~~~', index, tempWarehouse);
  1757. this.$set(
  1758. this.form.datasource[index],
  1759. 'warehouseList',
  1760. tempWarehouse
  1761. );
  1762. if (item.warehouseId) {
  1763. this.$set(
  1764. this.form.datasource[index],
  1765. 'warehouseNum',
  1766. await getWarehouseOutStock({
  1767. warehouseId: item.warehouseId,
  1768. code: item.productCode
  1769. })
  1770. );
  1771. } else {
  1772. if (this.form.datasource[index]?.warehouseList?.length) {
  1773. this.$set(
  1774. this.form.datasource[index],
  1775. 'warehouseId',
  1776. this.form.datasource[index]?.warehouseList[0].warehouseId
  1777. );
  1778. await this.warehouseChange(index, this.form.datasource[index]);
  1779. }
  1780. }
  1781. const templist1 = await getBatchList({
  1782. categoryCode: item.productCode,
  1783. warehouseId: item.warehouseId,
  1784. size: -1
  1785. });
  1786. let tempBatchNoList = templist1?.list || [];
  1787. console.log('888~~~~', index, item.batchNo);
  1788. tempBatchNoList.push({
  1789. batchNo: item.batchNo,
  1790. id: 999,
  1791. measureQuantity: 0
  1792. })
  1793. console.log('tempBatchNoList~~~~', index, tempBatchNoList);
  1794. // 批次号
  1795. this.$set(
  1796. this.form.datasource[index],
  1797. 'batchNoList',
  1798. tempBatchNoList
  1799. );
  1800. this.$set(
  1801. this.form.datasource[index],
  1802. 'batchStockId',
  1803. 999
  1804. );
  1805. this.$set(
  1806. this.form.datasource[index],
  1807. 'warehouseNum',
  1808. ''
  1809. );
  1810. }
  1811. }
  1812. },
  1813. remove(i) {
  1814. this.form.datasource.splice(i, 1);
  1815. this.setSort();
  1816. },
  1817. // 重新排序
  1818. setSort() {
  1819. this.form.datasource.forEach((n, index) => {
  1820. n.key = index + 1;
  1821. });
  1822. },
  1823. //选择产品
  1824. handParent() {
  1825. if (!this.orderId && !this.orderIds)
  1826. return this.$message.error('请先选择订单');
  1827. this.$refs.BIZproductListRef.open('', -1);
  1828. },
  1829. // 添加
  1830. handlAdd() {
  1831. if (!this.orderId && !this.orderIds)
  1832. return this.$message.error('请先选择订单');
  1833. this.$refs.productListRef.open(this.oldProductList);
  1834. },
  1835. //库存台账
  1836. selectStockLedgerDialogOpen(row) {
  1837. this.current = row;
  1838. this.$refs.selectStockLedgerDialogRef.open();
  1839. },
  1840. validateForm(callback) {
  1841. //开始表单校验
  1842. this.$refs.form.validate((valid, obj) => {
  1843. let is = false;
  1844. let isBatchNo = false;
  1845. let isSuspend = false;
  1846. this.form.datasource.forEach((item) => {
  1847. if (Number(item.totalCount) > item.orderTotalCount) {
  1848. is = true;
  1849. }
  1850. if (item.batchStockId == 999) {
  1851. isBatchNo = true;
  1852. }
  1853. if(item.isSuspend == 1 && (Number(item.totalCount) > item.warehouseNum)) {
  1854. isSuspend = true;
  1855. }
  1856. });
  1857. // 退货单退货不校验数量,实物赔偿无法计算
  1858. if (is && this.sourceType != 3) {
  1859. this.$message.warning('发货数量大于订单总数量');
  1860. if (this.isTotalCount == 1) {
  1861. callback(false);
  1862. }
  1863. }
  1864. if (isBatchNo) {
  1865. this.$message.warning('你填的批次号与库存批次号不相符,请重新选择批次号出库或删除批次号');
  1866. callback(false);
  1867. }
  1868. if (isSuspend) {
  1869. this.$message.warning('挂起产品发货数量不能大于库存');
  1870. callback(false);
  1871. }
  1872. if (obj) {
  1873. let messages = Object.keys(obj).map((key) => obj[key][0]);
  1874. if (messages.length > 0) {
  1875. this.$message.warning(messages[0].message);
  1876. }
  1877. }
  1878. callback(valid);
  1879. });
  1880. },
  1881. /**
  1882. * 优化后的表单校验方法 - 重构版本
  1883. * 添加了详细的注释、错误消息常量和更清晰的结构
  1884. */
  1885. validateFormOptimized(callback) {
  1886. // 使用常量存储错误消息
  1887. const ERROR_MESSAGES = {
  1888. QUANTITY_EXCEEDS_ORDER: '发货数量大于订单总数量',
  1889. BATCH_NUMBER_INVALID: '你填的批次号与库存批次号不相符,请重新选择批次号出库或删除批次号',
  1890. SUSPENDED_PRODUCT_OVERSTOCK: '挂起产品发货数量不能大于库存'
  1891. };
  1892. // 开始表单校验
  1893. this.$refs.form.validate((valid, obj) => {
  1894. // 收集所有校验错误
  1895. const errors = [];
  1896. // 遍历数据源进行业务规则校验
  1897. this.form.datasource.forEach((item, index) => {
  1898. const productInfo = this.getProductDisplayInfo(item);
  1899. // 检查数量是否超过订单数量(退货单除外)
  1900. if (this.isQuantityExceedsOrder(item)) {
  1901. if (this.sourceType != 3) { // 非退货单
  1902. errors.push({
  1903. type: 'quantity',
  1904. message: `产品[${productInfo.name}]的发货数量${item.totalCount}大于订单总数量${item.orderTotalCount}`,
  1905. stopValidation: this.isTotalCount == 1,
  1906. item: item
  1907. });
  1908. }
  1909. }
  1910. // 检查批次号是否正确
  1911. // if (this.isBatchNumberInvalid(item)) {
  1912. // errors.push({
  1913. // type: 'batch',
  1914. // message: `产品[${productInfo.name}]填写的批次号与库存批次号不相符,请重新选择批次号出库或删除批次号`,
  1915. // stopValidation: true,
  1916. // item: item
  1917. // });
  1918. // }
  1919. if (this.isBatchNumberInvalid(item) && item.isSuspend != 1) {
  1920. // 获取当前批次号和正确的库存批次号信息
  1921. const currentBatchNumber = item.batchNo || '未填写';
  1922. // const availableBatches = item.availableBatchNumbers || item.validBatchNumbers || [];
  1923. // const batchInfo = availableBatches.length > 0
  1924. // ? `当前可选择批次号:${availableBatches.join('、')}`
  1925. // : '当前无有效批次';
  1926. errors.push({
  1927. type: 'batch',
  1928. message: `第${index + 1}条产品[${productInfo.name}]填写的批次号"${currentBatchNumber}"与库存批次号不相符,请重新选择批次号出库或删除批次号`,
  1929. stopValidation: true,
  1930. item: item
  1931. });
  1932. }
  1933. // 检查挂起产品库存
  1934. if (this.isSuspendedProductOverstock(item)) {
  1935. errors.push({
  1936. type: 'suspend',
  1937. message: `挂起产品[${productInfo.name}]的发货数量${item.totalCount}不能大于库存${item.warehouseNum}`,
  1938. stopValidation: true,
  1939. item: item
  1940. });
  1941. }
  1942. });
  1943. // 如果存在错误,显示第一个错误并根据情况终止校验
  1944. if (errors.length > 0) {
  1945. this.$message.warning(errors[0].message);
  1946. if (errors[0].stopValidation) {
  1947. callback(false);
  1948. return;
  1949. }
  1950. }
  1951. // 显示表单字段错误(如果存在)
  1952. if (obj) {
  1953. let messages = Object.keys(obj).map((key) => obj[key][0]);
  1954. if (messages.length > 0) {
  1955. this.$message.warning(messages[0].message);
  1956. }
  1957. }
  1958. callback(valid);
  1959. });
  1960. },
  1961. /**
  1962. * 检查数量是否超过订单数量
  1963. * @param {Object} item 数据项
  1964. * @returns {boolean} 是否超过
  1965. */
  1966. isQuantityExceedsOrder(item) {
  1967. return Number(item.totalCount) > item.orderTotalCount;
  1968. },
  1969. /**
  1970. * 检查批次号是否无效
  1971. * @param {Object} item 数据项
  1972. * @returns {boolean} 是否无效
  1973. */
  1974. isBatchNumberInvalid(item) {
  1975. return item.batchStockId == 999;
  1976. },
  1977. /**
  1978. * 检查挂起产品是否超过库存
  1979. * @param {Object} item 数据项
  1980. * @returns {boolean} 是否超过
  1981. */
  1982. isSuspendedProductOverstock(item) {
  1983. return item.isSuspend == 1 && Number(item.totalCount) > item.warehouseNum;
  1984. },
  1985. /**
  1986. * 获取产品显示信息
  1987. * @param {Object} item 数据项
  1988. * @returns {Object} 包含产品名称和编码的对象
  1989. */
  1990. getProductDisplayInfo(item) {
  1991. return {
  1992. name: item.productName || item.name || '未知产品',
  1993. code: item.productCode || item.code || '',
  1994. info: item.productName && item.productCode
  1995. ? `${item.productName}(${item.productCode})`
  1996. : (item.productName || item.name || '未知产品')
  1997. };
  1998. }
  1999. }
  2000. };
  2001. </script>
  2002. <style lang="scss" scoped>
  2003. ::v-deep .el-table .warning-row {
  2004. background: #d9ecff;
  2005. }
  2006. .headbox {
  2007. display: flex;
  2008. justify-content: flex-start;
  2009. align-items: center;
  2010. .amount {
  2011. font-size: 14px;
  2012. font-weight: bold;
  2013. padding-right: 30px;
  2014. }
  2015. }
  2016. .time-form .el-form-item {
  2017. margin-bottom: 0 !important;
  2018. }
  2019. ::v-deep .period {
  2020. display: flex;
  2021. .borderleftnone {
  2022. .el-input--medium .el-input__inner {
  2023. border-top-right-radius: 0;
  2024. border-bottom-right-radius: 0;
  2025. }
  2026. }
  2027. .borderrightnone {
  2028. .el-input--medium .el-input__inner {
  2029. border-top-left-radius: 0;
  2030. border-bottom-left-radius: 0;
  2031. }
  2032. }
  2033. }
  2034. ::v-deep .time-form tbody > tr:hover > td {
  2035. background-color: transparent !important;
  2036. }
  2037. // ::v-deep .time-form .el-table tr {
  2038. // background-color: #ffffff;
  2039. // }
  2040. .pricebox {
  2041. display: flex;
  2042. justify-content: flex-start;
  2043. align-items: center;
  2044. font-weight: bold;
  2045. }
  2046. </style>