addInventory.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. <template>
  2. <div class="bg-in-stock">
  3. <el-form
  4. ref="goodsExchangeAddForm"
  5. :model="goodsExchangeAddForm"
  6. :rules="goodsExchangeAddFormRule"
  7. label-width="160px"
  8. inline
  9. class="change-form"
  10. >
  11. <el-form-item label="订单" prop="order_id" class="change-form-item">
  12. <span>
  13. <el-input
  14. v-model="goodsExchangeAddForm.sn"
  15. :disabled="type === 'detail' || type === 'audit'"
  16. ref="order"
  17. >
  18. </el-input>
  19. <el-button @click="blurUsername()">搜索</el-button>
  20. <el-button @click="orderBtn">订单列表</el-button>
  21. </span>
  22. </el-form-item>
  23. <el-form-item
  24. prop="warehouse_id"
  25. label="入库仓库"
  26. class="change-form-item"
  27. >
  28. <el-select
  29. v-model="goodsExchangeAddForm.warehouse_id"
  30. clearable
  31. :disabled="type === 'detail' || type === 'audit'"
  32. >
  33. <!--@blur="" @change="handleChangeWareHouse" -->
  34. <el-option
  35. v-for="item in warehouseList"
  36. :key="item.id"
  37. :label="item.name"
  38. :value="item.id"
  39. />
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item label="类型" prop="type" class="change-form-item">
  43. <el-select
  44. v-model="goodsExchangeAddForm.type"
  45. filterable
  46. allow-create
  47. clearable
  48. default-first-option
  49. :disabled="type === 'detail' || type === 'audit'"
  50. >
  51. <el-option
  52. v-for="item in typeList"
  53. :key="item.id"
  54. :label="item.label"
  55. :value="item.value"
  56. :disabled="item.value=='TRANSFER_ENTRY'"
  57. />
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item
  61. label="备注"
  62. prop="change_desc"
  63. class="change-form-item"
  64. style="width: 61%"
  65. >
  66. <el-input
  67. style="flex: 1"
  68. v-model="goodsExchangeAddForm.memo"
  69. type="textarea"
  70. :disabled="type === 'detail' || type === 'audit'"
  71. :autosize="{ minRows: 3, maxRows: 4 }"
  72. placeholder="请输入"
  73. ></el-input>
  74. </el-form-item>
  75. <div class="mx">
  76. <h3>商品明细</h3>
  77. <el-button
  78. class="button"
  79. size="mini"
  80. type="primary"
  81. v-if="type !== 'detail' && type !== 'audit'"
  82. @click="scanCode"
  83. >扫码入库</el-button
  84. >
  85. <el-button
  86. class="button"
  87. size="mini"
  88. type="primary"
  89. v-if="type !== 'detail' && type !== 'audit'"
  90. @click="handleSelectWarehouseEntryBatch"
  91. >选择</el-button
  92. >
  93. </div>
  94. <div style="width: 100%; display: block">
  95. <el-form-item style="width: 100%">
  96. <el-table
  97. :data="goodsExchangeAddForm.product_list"
  98. border
  99. :cell-style="{ textAlign: 'center' }"
  100. :header-cell-style="{ textAlign: 'center' }"
  101. style="width: 100%; margin-top: 20px"
  102. >
  103. <el-table-column label="商品编号">
  104. <template slot-scope="scope">
  105. {{ scope.row.goods_vo.sn }}
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="商品名称">
  109. <template slot-scope="scope">
  110. {{ scope.row.goods_vo.name }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="条码">
  114. <template slot-scope="scope">
  115. <span v-if="id">{{ scope.row.product_vo.bar_code }}</span>
  116. <span v-else>{{ scope.row.product_vo.bar_code }}</span>
  117. </template>
  118. </el-table-column>
  119. <el-table-column label="序列号">
  120. <template slot-scope="scope">
  121. <div class="sn-code-container">
  122. <span v-for="item in scope.row.sn_code_list" :key="item.id">
  123. {{ item.sn_code }},
  124. </span>
  125. </div>
  126. <!-- <span v-if="id">{{ scope.row.product_vo.sn_code }}</span>
  127. <span v-else>{{ scope.row.sn_code }}</span> -->
  128. </template>
  129. </el-table-column>
  130. <el-table-column
  131. prop="product_vo.spec_name"
  132. label="规格型号"
  133. v-if="id"
  134. >
  135. <!-- <template slot-scope="scope">
  136. {{ scope.row.product_vo.spec_name }}
  137. </template> -->
  138. </el-table-column>
  139. <el-table-column
  140. prop="product_vo.spec_name"
  141. label="规格型号"
  142. v-else
  143. >
  144. <!-- <template slot-scope="scope">
  145. {{ scope.row.spec_name }}
  146. </template> -->
  147. </el-table-column>
  148. <el-table-column label="单位">
  149. <template slot-scope="scope">
  150. <span v-if="id">{{ scope.row.product_vo.unit }}</span>
  151. <span v-else>{{ scope.row.product_vo.unit }}</span>
  152. </template>
  153. </el-table-column>
  154. <!-- <el-table-column label="订单数量">
  155. </el-table-column> -->
  156. <el-table-column label="入库数量">
  157. <template slot-scope="scope">
  158. <el-input-number
  159. v-model="scope.row.num"
  160. type="number"
  161. :min="0"
  162. :maxlength="20"
  163. :disabled="type === 'detail' || type === 'audit'"
  164. ></el-input-number>
  165. </template>
  166. </el-table-column>
  167. <!-- <el-table-column label="库存数量">
  168. <template slot-scope="scope">
  169. {{ scope.row.usable_stock }}
  170. </template>
  171. </el-table-column>-->
  172. <el-table-column label="差异">
  173. <template slot-scope="scope">
  174. <span v-if="scope.row.sn_code_list">{{
  175. scope.row.num - scope.row.sn_code_list.length || 0
  176. }}</span>
  177. </template>
  178. </el-table-column>
  179. <el-table-column
  180. width="200"
  181. label="操作"
  182. v-if="type !== 'detail' && type !== 'audit'"
  183. >
  184. <template slot-scope="scope">
  185. <el-button
  186. size="mini"
  187. @click="addSnCode(scope.row, scope.$index)"
  188. >添加序列号</el-button
  189. >
  190. <el-button
  191. size="mini"
  192. type="danger"
  193. @click="
  194. goodsExchangeAddForm.product_list.splice(scope.$index, 1)
  195. "
  196. >删除</el-button
  197. >
  198. </template>
  199. </el-table-column>
  200. </el-table>
  201. </el-form-item>
  202. </div>
  203. </el-form>
  204. <div class="footer">
  205. <!-- <el-button v-if="type === 'audit'" type="primary" @click="handlePassGoodsExchange()">审核通过
  206. </el-button>
  207. <el-button v-if="type === 'audit'" type="danger" @click="dialogVisible = true">审核驳回
  208. </el-button> -->
  209. <el-button
  210. v-if="type !== 'audit' && type !== 'detail'"
  211. type="primary"
  212. @click="savegoodsExchangeAddForm"
  213. >保存
  214. </el-button>
  215. <el-button
  216. v-if="type !== 'audit' && type !== 'detail'"
  217. type="primary"
  218. @click="submitgoodsExchangeAddForm"
  219. >入库
  220. </el-button>
  221. <el-button @click="printIng" v-if="type == 'audit'">打印</el-button>
  222. <el-button @click="toBack()">返回</el-button>
  223. </div>
  224. <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
  225. <el-form
  226. ref="goodsExchangeAddForm"
  227. :model="goodsExchangeAddForm"
  228. label-width="120px"
  229. inline
  230. style="width: 900px"
  231. >
  232. <el-form-item label="驳回原因" prop="reject_reason">
  233. <el-input
  234. v-model="goodsExchangeAddForm.reject_reason"
  235. type="textarea"
  236. :minlength="0"
  237. :maxlength="100"
  238. ></el-input>
  239. </el-form-item>
  240. </el-form>
  241. <span slot="footer" class="dialog-footer">
  242. <el-button @click="dialogVisible = false">取 消</el-button>
  243. <el-button type="primary" @click="handleRejectGoodsExchange()"
  244. >确 定</el-button
  245. >
  246. </span>
  247. </el-dialog>
  248. <el-dialog
  249. title="扫码入库"
  250. :visible.sync="scanDialogVisible"
  251. width="30%"
  252. :close-on-press-escape="false"
  253. :close-on-click-modal="false"
  254. >
  255. <el-form
  256. ref="scanGoodsForm"
  257. :model="scanGoodsForm"
  258. label-width="120px"
  259. inline
  260. >
  261. <el-form-item label="条码" prop="bar_code">
  262. <el-input
  263. v-model="scanGoodsForm.bar_code"
  264. ref="input"
  265. @keyup.enter.native="toSearch()"
  266. @blur="blurCode()"
  267. :minlength="0"
  268. :maxlength="100"
  269. ></el-input>
  270. </el-form-item>
  271. <!-- <el-form-item label="序列号" prop="sn_code">
  272. <el-input
  273. v-model="scanGoodsForm.sn_code"
  274. :minlength="0"
  275. :maxlength="100"
  276. ></el-input>
  277. </el-form-item> -->
  278. </el-form>
  279. </el-dialog>
  280. <el-dialog
  281. title="入库商品"
  282. :visible.sync="goodsVisible"
  283. width="1000px"
  284. @close="closeGoosData"
  285. >
  286. <el-table
  287. :data="goodsData"
  288. border
  289. style="width: 100%"
  290. @selection-change="handleSelectionChange"
  291. >
  292. <el-table-column type="selection" width="55" />
  293. <el-table-column prop="" label="商品编号">
  294. <template slot-scope="scope">
  295. {{ scope.row.goods_vo.sn }}
  296. </template>
  297. </el-table-column>
  298. <el-table-column prop="product_vo.bar_code" label="商品条码">
  299. </el-table-column>
  300. <!-- <el-table-column prop="" label="序列号"></el-table-column> -->
  301. <el-table-column prop="" label="商品名称">
  302. <template slot-scope="scope">
  303. {{ scope.row.goods_vo.name }}
  304. </template>
  305. </el-table-column>
  306. <el-table-column prop="product_vo.spec_name" label="规格型号">
  307. <!-- <template slot-scope="scope">
  308. {{ scope.row.spec_name }}
  309. </template> -->
  310. </el-table-column>
  311. <el-table-column prop="product_vo.unit" label="单位"> </el-table-column>
  312. <!-- <el-table-column prop="product_list.stock_num" label="库存数量"> </el-table-column> -->
  313. </el-table>
  314. <!-- <el-pagination
  315. slot="pagination"
  316. @size-change="handlePageSizeChange"
  317. @current-change="handlePageCurrentChange"
  318. :current-page="goodsData.page_no"
  319. :page-sizes="[10, 20, 50, 100]"
  320. :page-size="goodsData.page_size"
  321. layout="total, sizes, prev, pager, next, jumper"
  322. :total="goodsData.data_total"
  323. >
  324. </el-pagination> -->
  325. <span slot="footer" class="dialog-footer">
  326. <el-button @click="closeGoosData">取 消</el-button>
  327. <el-button type="primary" @click="submitGoosData()">确 定</el-button>
  328. </span>
  329. </el-dialog>
  330. <el-dialog
  331. title="订单列表"
  332. :visible.sync="orderVisible"
  333. width="1000px"
  334. @close="closeGoosData"
  335. >
  336. <el-table
  337. :data="orderList.data"
  338. border
  339. style="width: 100%"
  340. @selection-change="handleSelectionChange"
  341. >
  342. <el-table-column type="selection" width="55" />
  343. <el-table-column prop="" label="订单编号">
  344. <template slot-scope="scope">
  345. {{ scope.row.sn }}
  346. </template>
  347. </el-table-column>
  348. <!-- <el-table-column prop="member_id" label="客户">
  349. <template slot-scope="scope">{{
  350. memberType(scope.row.member_id)
  351. }}</template>
  352. </el-table-column>
  353. -->
  354. <el-table-column prop="order_time" label="下单时间">
  355. <template slot-scope="scope">{{
  356. scope.row.order_time | unixToDate
  357. }}</template>
  358. </el-table-column>
  359. <el-table-column prop="" label="仓库名称">
  360. <template slot-scope="scope">
  361. {{ warehouseName(scope.row.warehouse_id) }}
  362. </template>
  363. </el-table-column>
  364. <el-table-column prop="" label="配送方式">
  365. <template slot-scope="scope">{{
  366. deliveryType(scope.row.send_type)
  367. }}</template>
  368. </el-table-column>
  369. <!-- <el-table-column prop="pay_type" label="付款方式">
  370. <template slot-scope="scope">{{
  371. payType(scope.row.pay_type)
  372. }}</template>
  373. </el-table-column> -->
  374. <el-table-column prop="" label="实付金额">
  375. <template slot-scope="scope">{{
  376. "¥" + scope.row.pay_price
  377. }}</template>
  378. </el-table-column>
  379. <!-- <el-table-column prop="" label="订单状态">
  380. <template slot-scope="scope">
  381. {{ typeName(scope.row.status) }}
  382. </template>
  383. </el-table-column> -->
  384. </el-table>
  385. <el-pagination
  386. @size-change="handlePageSizeChange"
  387. @current-change="handlePageCurrentChange"
  388. :current-page="orderList.page_no"
  389. :page-sizes="[10, 20, 50, 100]"
  390. :page-size="orderList.page_size"
  391. layout="total, sizes, prev, pager, next, jumper"
  392. :total="orderList.data_total"
  393. >
  394. </el-pagination>
  395. <span slot="footer" class="dialog-footer">
  396. <el-button @click="closeOrder">取 消</el-button>
  397. <el-button type="primary">确 定</el-button>
  398. </span>
  399. </el-dialog>
  400. <el-dialog
  401. title="序列号"
  402. @close="closeSncode"
  403. :visible.sync="snCodeVisible"
  404. width="30%"
  405. :close-on-press-escape="false"
  406. :close-on-click-modal="false"
  407. >
  408. <el-form
  409. ref="scanGoodsForm"
  410. :model="scanGoodsForm"
  411. label-width="120px"
  412. inline
  413. >
  414. <el-form-item label="序列号" prop="sn_code">
  415. <el-input
  416. v-model="sn_code"
  417. @keyup.enter.native="toSnCode()"
  418. :minlength="0"
  419. :maxlength="100"
  420. ></el-input>
  421. </el-form-item>
  422. </el-form>
  423. </el-dialog>
  424. </div>
  425. </template>
  426. <script>
  427. import { mapGetters } from "vuex";
  428. import { Foundation, RegExp } from "~/ui-utils";
  429. import * as API_GoodsExchange from "@/api/goodsExchange";
  430. import * as API_Setting from "@/api/setting";
  431. import * as API_BasicSetting from "@/api/basicSetting";
  432. import * as API_Erp from "@/api/erp";
  433. import * as API_Auth from "@/api/auth";
  434. import * as API_order from "@/api/order";
  435. import * as API_Goods from "@/api/goods";
  436. import * as API_CollectingAccount from "@/api/collectingAccount";
  437. export default {
  438. name: "goodsExchangeAdd",
  439. data() {
  440. const checkPrice = (rule, value, callback) => {
  441. if (!value && value !== 0) {
  442. return callback(new Error("换货金额不能为空"));
  443. } else if (!RegExp.money.test(value)) {
  444. callback(new Error("请输入正整数或者两位小数"));
  445. } else if (parseFloat(value) > 99999999) {
  446. callback(new Error("换货金额设置超过上限值"));
  447. } else {
  448. callback();
  449. }
  450. };
  451. return {
  452. //分页
  453. params: {
  454. page_no: 1,
  455. page_size: 10,
  456. },
  457. typeList: [
  458. /* {
  459. real_name: "采购入库",
  460. id: "采购入库",
  461. },
  462. {
  463. real_name: "租赁返回",
  464. id: "租赁返回",
  465. },
  466. {
  467. real_name: "其他入库",
  468. id: "其他入库",
  469. }, */
  470. ],
  471. adminList: [],
  472. dialogVisible: false,
  473. warehouseList: [],
  474. deptList: [],
  475. deptListAll: [],
  476. orderList: [],
  477. id: "",
  478. type: "",
  479. /** 入库单表单*/
  480. goodsExchangeAddForm: {
  481. contract_product_list: [],
  482. /* additionalProp1: {
  483. barcode: "string",
  484. category_id: 0,
  485. category_name: "string",
  486. contract_id: 0,
  487. goods_id: 0,必填
  488. num: 0,
  489. price: 0,
  490. product_id: 0,//必填
  491. product_name: "string",
  492. product_sn: "string",
  493. specification: "string",
  494. stock_num: 0,
  495. tax_rate: 0,
  496. total_price: 0,
  497. unit: "string",
  498. },
  499. additionalProp2: {
  500. barcode: "string",
  501. category_id: 0,
  502. category_name: "string",
  503. contract_id: 0,
  504. goods_id: 0,
  505. num: 0,
  506. price: 0,
  507. product_id: 0,
  508. product_name: "string",
  509. product_sn: "string",
  510. specification: "string",
  511. stock_num: 0,
  512. tax_rate: 0,
  513. total_price: 0,
  514. unit: "string",
  515. },
  516. additionalProp3: {
  517. barcode: "string",
  518. category_id: 0,
  519. category_name: "string",
  520. contract_id: 0,
  521. goods_id: 0,
  522. num: 0,
  523. price: 0,
  524. product_id: 0,
  525. product_name: "string",
  526. product_sn: "string",
  527. specification: "string",
  528. stock_num: 0,
  529. tax_rate: 0,
  530. total_price: 0,
  531. unit: "string",
  532. }, */
  533. product_list: [],
  534. },
  535. /** 校验规则 */
  536. goodsExchangeAddFormRule: {
  537. warehouse_id: [
  538. { required: true, message: "请选择入库仓库", trigger: "change" },
  539. ],
  540. type: [
  541. { required: true, message: "请选择入库类型", trigger: "change" },
  542. ],
  543. // order_id: [
  544. // { required: true, message: "请输入订单编号", trigger: "blur" },
  545. // ],
  546. // change_amount: [
  547. // { required: true, message: '请输入换货金额', trigger: 'blur' },
  548. // { validator: checkPrice, trigger: 'blur' }
  549. // ]
  550. },
  551. warehouseProduct: null,
  552. scanDialogVisible: false,
  553. scanGoodsForm: {},
  554. routeName: "",
  555. //出入库
  556. sttorageType: "",
  557. // 出库商品明细
  558. goodsVisible: false,
  559. goodsData: [],
  560. // 暂存已勾选商品
  561. goodsList: [],
  562. //订单列表
  563. orderVisible: false,
  564. deliveryTypeList: [
  565. {
  566. code: "express",
  567. name: "快递配送",
  568. },
  569. {
  570. code: "self_pick",
  571. name: "门店自提",
  572. },
  573. ],
  574. snCodeVisible: false,
  575. sn_code: "",
  576. sku: "",
  577. sn_code_list: [],
  578. index: "",
  579. };
  580. },
  581. mounted() {
  582. this.$nextTick(() => {
  583. this.$refs.order.focus();
  584. });
  585. this.routeName = this.$route.name;
  586. this.sttorageType = this.$route.params.type;
  587. this.GET_WarehouseList();
  588. this.GET_DeptList();
  589. },
  590. watch: {
  591. $route: {
  592. immediate: true,
  593. handler(newVal) {
  594. if (this.$route.name === "goodsExchangeEdit") {
  595. this.type = "edit";
  596. } else if (this.$route.name === "goodsExchangeAudit") {
  597. this.type = "audit";
  598. } else if (this.$route.name === "goodsExchangeReturn") {
  599. this.type = "return";
  600. } else if (this.$route.name === "goodsExchangeAdd") {
  601. this.type = "add";
  602. this.goodsExchangeAddForm = {
  603. change_amount: 0,
  604. change_list: [],
  605. return_list: [],
  606. product_list: [],
  607. handled_by_id: this.user.uid,
  608. dept_id: this.user.dept_id,
  609. };
  610. // this.goodsExchangeAddForm.handled_by_id = this.user.uid
  611. // this.goodsExchangeAddForm.dept_id = this.user.dept_id
  612. this.GET_WarehouseList({ dept_id: this.user.dept_id });
  613. this.$set(
  614. this.goodsExchangeAddForm,
  615. "change_time",
  616. new Date().getTime()
  617. );
  618. } else if (this.$route.name === "goodsExchangeDetail") {
  619. this.type = "detail";
  620. }
  621. if (this.$route.params.id) {
  622. this.id = this.$route.params.id;
  623. this.GET_goodsExchangeAddDetail();
  624. }
  625. this.GET_AdministratorList();
  626. },
  627. },
  628. },
  629. computed: {
  630. ...mapGetters(["user"]),
  631. },
  632. methods: {
  633. /* 返回出入明细 */
  634. toBack() {
  635. this.$router.push({
  636. name: "goodsExchange",
  637. params: { type: "second" },
  638. });
  639. },
  640. closeSncode() {
  641. this.sn_code = "";
  642. this.snCodeVisible = false;
  643. },
  644. //扫序列号goodsExchangeAddForm.product_list[this.index].sn_code_list
  645. toSnCode() {
  646. API_GoodsExchange.getSnCode("in", this.sku, this.sn_code).then((res) => {
  647. /* this.sn_code_list.push(res); */
  648. this.sn_code = "";
  649. this.snCodeVisible = false;
  650. this.goodsExchangeAddForm.product_list[this.index].sn_code_list.push(
  651. res
  652. );
  653. });
  654. },
  655. addSnCode(row, index) {
  656. /* this.goodsExchangeAddForm.product_list[index].sn_code_list =[] */
  657. this.sku = row.product_vo.sku;
  658. this.index = index;
  659. this.snCodeVisible = true;
  660. },
  661. orderBtn() {
  662. API_order.getOrderList(this.params).then((res) => {
  663. this.orderList = res;
  664. this.orderVisible = true;
  665. });
  666. },
  667. closeOrder() {
  668. this.orderVisible = false;
  669. },
  670. /** 分页大小发生改变 */
  671. handlePageSizeChange(size) {
  672. this.params.page_size = size;
  673. API_order.getOrderList(this.params).then((res) => {
  674. this.orderList = res;
  675. });
  676. },
  677. /** 分页页数发生改变 */
  678. handlePageCurrentChange(page) {
  679. this.params.page_no = page;
  680. API_order.getOrderList(this.params).then((res) => {
  681. this.orderList = res;
  682. });
  683. },
  684. /* 订单客户信息 */
  685. memberType(val) {
  686. let name = "";
  687. API_BasicSetting.customer(this.params).then((response) => {
  688. response.data.map((el) => {
  689. if (el.id == val) {
  690. return (name = el.name);
  691. }
  692. });
  693. return name;
  694. });
  695. },
  696. //获取仓库名称
  697. warehouseName(val) {
  698. let name = "";
  699. this.warehouseList.map((el) => {
  700. if (el.id == val) {
  701. return (name = el.name);
  702. }
  703. });
  704. return name;
  705. },
  706. //配送方式名称
  707. deliveryType(val) {
  708. let name = "";
  709. this.deliveryTypeList.map((el) => {
  710. if (el.code == val) {
  711. return (name = el.name);
  712. }
  713. });
  714. return name;
  715. },
  716. //获取付款方式
  717. payType(val) {
  718. let name = "";
  719. API_CollectingAccount.getList({
  720. page_no: 1,
  721. page_size: -1,
  722. enable_flag: true,
  723. }).then((response) => {
  724. response.data.map((el) => {
  725. if (el.id == val) {
  726. return (name = el.name);
  727. }
  728. });
  729. return name;
  730. });
  731. },
  732. //获取订单状态大小写转换.toUpperCase()
  733. typeName(val) {
  734. let name = "";
  735. this.$nextTick(() => {
  736. API_Setting.getPage({ dictType: "order_status" }).then((res) => {
  737. res.data.map((el) => {
  738. if (el.value == val) {
  739. name = el.label;
  740. console.log(name);
  741. return name;
  742. }
  743. });
  744. });
  745. });
  746. },
  747. // 根据条码 序列号查询商品
  748. blurCode() {
  749. if (
  750. this.scanGoodsForm.bar_code !== undefined ||
  751. this.scanGoodsForm.sn_code !== undefined
  752. ) {
  753. // 通过列表查询商品详细信息
  754. API_Goods.getGoodsList({
  755. barcode: this.scanGoodsForm.bar_code,
  756. sncode: this.scanGoodsForm.sn_code,
  757. }).then((res) => {
  758. console.log(res);
  759. this.goodsExchangeAddForm.contract_product_list = res.data;
  760. this.scanDialogVisible = false;
  761. });
  762. }
  763. },
  764. // 查询订单编号
  765. blurUsername() {
  766. if (this.goodsExchangeAddForm.sn !== undefined) {
  767. API_GoodsExchange.getOneBySn(this.goodsExchangeAddForm.sn).then(
  768. (res) => {
  769. this.goodsExchangeAddForm.scan_order_sn=this.goodsExchangeAddForm.sn
  770. this.goodsExchangeAddForm.scan_order_type=res.type
  771. this.goodsExchangeAddForm.order_id=res.id
  772. res.item_list.map(el=>{
  773. el.scan_order_item_id=el.id
  774. el.scan_order_id=res.id
  775. el.orderNum=el.num
  776. el.sn_code_list=[]
  777. })
  778. this.goodsExchangeAddForm.product_list=res.item_list
  779. }
  780. );
  781. } /* else{
  782. this.$message.error("请填写订单编号")
  783. } */
  784. },
  785. /* 通过id查询商品信息
  786. orderInfo(id){
  787. API_
  788. },*/
  789. handleSelectionChange(val) {
  790. this.goodsList = val.map((el) => {
  791. el.product_id = el.id;
  792. el.goods_id = el.id;
  793. el.sn_code_list = [];
  794. return el;
  795. });
  796. },
  797. // 保存已选商品
  798. submitGoosData() {
  799. if (this.goodsList.length >= 1) {
  800. /* let ids=[]
  801. const param_list={
  802. warehouse_id:this.goodsExchangeAddForm.warehouse_id,
  803. good_ids:ids
  804. }
  805. this.goodsList.forEach(el=>{
  806. ids.push(el.id)
  807. })
  808. API_GoodsExchange.getStockByWarehouseGood(param_list).then(res=>{
  809. res.map(el=>{
  810. el.product_id=el.id
  811. el.goods_id=el.id
  812. })
  813. this.goodsExchangeAddForm.product_list = res;
  814. this.goodsExchangeAddForm.contract_product_list = res;
  815. console.log(res);
  816. }) */
  817. this.goodsExchangeAddForm.product_list = this.goodsList; //.map(el=>{el.sn_code_list=[]})
  818. console.log(this.goodsList);
  819. this.goodsVisible = false;
  820. } else {
  821. this.$message.error("请选择商品信息");
  822. }
  823. },
  824. // 关闭商品明细
  825. closeGoosData() {
  826. this.goodsVisible = false;
  827. },
  828. // 打印功能
  829. printIng() {},
  830. /* 扫条码 */
  831. toSearch() {
  832. API_GoodsExchange.getProduct(
  833. this.goodsExchangeAddForm.warehouse_id,
  834. this.scanGoodsForm.bar_code
  835. ).then((res) => {
  836. res.sn_code_list = [];
  837. this.goodsExchangeAddForm.product_list.push(res);
  838. this.scanGoodsForm.bar_code = "";
  839. this.scanDialogVisible = false;
  840. });
  841. },
  842. // 扫码入库
  843. scanCode() {
  844. if (!this.goodsExchangeAddForm.warehouse_id) {
  845. this.$message.error("请先选择仓库!");
  846. return;
  847. }
  848. this.scanDialogVisible = true;
  849. this.$nextTick(() => {
  850. this.$refs.input.focus();
  851. });
  852. },
  853. /** 获取人员列表 */
  854. GET_AdministratorList() {
  855. API_Auth.getAdministratorList({
  856. page_no: 1,
  857. page_size: 9999,
  858. user_state: 0,
  859. }).then((response) => {
  860. this.adminList = response.data;
  861. });
  862. },
  863. /** 清除已选商品明细 */
  864. cleanGoodsList() {
  865. // 切换部门或仓库需要清除已选对应仓库下的商品数据 change_list
  866. this.goodsExchangeAddForm.contract_product_list = [];
  867. this.goodsExchangeAddForm.product_list = [];
  868. },
  869. changewarehouseList(e) {
  870. this.$set(this.goodsExchangeAddForm, "warehouse_id", "");
  871. this.GET_WarehouseList({ dept_id: e });
  872. this.cleanGoodsList();
  873. },
  874. /** 审核-通过 */
  875. handlePassGoodsExchange() {
  876. if (this.goodsExchangeAddForm.check_amount_same === false) {
  877. this.$confirm(this.goodsExchangeAddForm.diff_amount_message, "提示", {
  878. type: "warning",
  879. })
  880. .then(() => {
  881. this.$confirm("确定通过吗?", "提示", { type: "warning" })
  882. .then(() => {
  883. API_GoodsExchange.auditGoodsExchange(this.id, {
  884. status: "PASS",
  885. }).then(() => {
  886. this.$message.success("已通过!");
  887. const { callback } = this.$route.params;
  888. if (typeof callback === "function") callback();
  889. this.$store.dispatch("delCurrentViews", {
  890. view: this.$route,
  891. $router: this.$router,
  892. });
  893. this.$router.push({ name: "goodsExchange" });
  894. });
  895. })
  896. .catch(() => {});
  897. })
  898. .catch(() => {});
  899. } else {
  900. this.$confirm("确定通过吗?", "提示", { type: "warning" })
  901. .then(() => {
  902. API_GoodsExchange.auditGoodsExchange(this.id, {
  903. status: "PASS",
  904. }).then(() => {
  905. this.$message.success("已通过!");
  906. const { callback } = this.$route.params;
  907. if (typeof callback === "function") callback();
  908. this.$store.dispatch("delCurrentViews", {
  909. view: this.$route,
  910. $router: this.$router,
  911. });
  912. this.$router.push({ name: "goodsExchange" });
  913. });
  914. })
  915. .catch(() => {});
  916. }
  917. },
  918. /** 审核-拒绝 */
  919. handleRejectGoodsExchange() {
  920. this.$confirm("确定拒绝吗?", "提示", { type: "warning" })
  921. .then(() => {
  922. API_GoodsExchange.auditGoodsExchange(this.id, {
  923. status: "REJECT",
  924. reject_reason: this.goodsExchangeAddForm.reject_reason,
  925. }).then(() => {
  926. this.$message.success("已拒绝!");
  927. this.dialogVisible = false;
  928. const { callback } = this.$route.params;
  929. if (typeof callback === "function") callback();
  930. this.$store.dispatch("delCurrentViews", {
  931. view: this.$route,
  932. $router: this.$router,
  933. });
  934. this.$router.push({ name: "goodsExchange" });
  935. });
  936. })
  937. .catch(() => {});
  938. },
  939. /** 获取仓库 */
  940. GET_WarehouseList(e) {
  941. API_BasicSetting.getWarehouseListAll().then((response) => {
  942. this.warehouseList = response;
  943. });
  944. API_Setting.getPage({ dictType: "warehouse_entry_type" }).then((res) => {
  945. this.typeList = res.data;
  946. });
  947. },
  948. //保存
  949. savegoodsExchangeAddForm() {
  950. this.$refs["goodsExchangeAddForm"].validate((valid) => {
  951. if (valid) {
  952. const { id } = this.goodsExchangeAddForm;
  953. const params = this.MixinClone(this.goodsExchangeAddForm);
  954. params.handled_by = this.deptListAll;
  955. API_order.getOrderList({ sn: this.goodsExchangeAddForm.sn }).then(
  956. (res) => {
  957. params.order_id = Number(res.data[0].id);
  958. }
  959. );
  960. params.staff_name = this.goodsExchangeAddForm.distribution_name;
  961. if (params.warehouse_id) {
  962. params.warehouse_name = this.warehouseList.find(
  963. (ware) => ware.id === params.warehouse_id
  964. ).name;
  965. }
  966. if (params.handled_by_id) {
  967. params.handled_by = this.adminList.find(
  968. (admin) => admin.id === params.handled_by_id
  969. ).real_name;
  970. }
  971. params.change_time = Math.floor(params.change_time / 1000);
  972. //类型
  973. params.save_or_submit = "save";
  974. if (!params.product_list.length) {
  975. this.$message.error("请选择商品!");
  976. return;
  977. }
  978. params.product_list.map((el) => {
  979. el.product_stock_id = el.id;
  980. el.product_id = el.product_vo.id;
  981. el.id = "";
  982. if(!el.orderNum){
  983. el.scan_diff_num=el.orderNum-el.num
  984. }
  985. });
  986. if (this.$route.name === "editInventory") {
  987. API_GoodsExchange.editWarehouseEntry(id, params).then(
  988. (response) => {
  989. this.$message.success("修改成功!");
  990. const { callback } = this.$route.params;
  991. if (typeof callback === "function") callback();
  992. this.$store.dispatch("delCurrentViews", {
  993. view: this.$route,
  994. $router: this.$router,
  995. });
  996. this.$router.push({
  997. name: "goodsExchange",
  998. params: { type: "second" },
  999. });
  1000. }
  1001. );
  1002. } else if (this.$route.name === "addInventory") {
  1003. // 新增入库
  1004. API_GoodsExchange.warehouseEntry(params).then(() => {
  1005. this.$message.success("添加成功!");
  1006. const { callback } = this.$route.params;
  1007. if (typeof callback === "function") callback();
  1008. this.$store.dispatch("delCurrentViews", {
  1009. view: this.$route,
  1010. $router: this.$router,
  1011. });
  1012. this.$router.push({
  1013. name: "goodsExchange",
  1014. params: { type: "second" },
  1015. });
  1016. });
  1017. }
  1018. }
  1019. });
  1020. },
  1021. //入库
  1022. submitgoodsExchangeAddForm() {
  1023. this.$refs["goodsExchangeAddForm"].validate((valid) => {
  1024. if (valid) {
  1025. const { id } = this.goodsExchangeAddForm;
  1026. const params = this.MixinClone(this.goodsExchangeAddForm);
  1027. params.handled_by = this.deptListAll;
  1028. API_order.getOrderList({ sn: this.goodsExchangeAddForm.sn }).then(
  1029. (res) => {
  1030. console.log(res.data);
  1031. params.order_id = Number(res.data[0].id);
  1032. }
  1033. );
  1034. params.staff_name = this.goodsExchangeAddForm.distribution_name;
  1035. if (params.warehouse_id) {
  1036. params.warehouse_name = this.warehouseList.find(
  1037. (ware) => ware.id === params.warehouse_id
  1038. ).name;
  1039. }
  1040. if (params.handled_by_id) {
  1041. params.handled_by = this.adminList.find(
  1042. (admin) => admin.id === params.handled_by_id
  1043. ).real_name;
  1044. }
  1045. params.change_time = Math.floor(params.change_time / 1000);
  1046. params.save_or_submit = "submit";
  1047. if (!params.product_list.length) {
  1048. this.$message.error("请选择商品!");
  1049. return;
  1050. }
  1051. params.product_list.map((el) => {
  1052. el.product_stock_id = el.id;
  1053. el.product_id = el.product_vo.id;
  1054. el.id = "";
  1055. });
  1056. /* */ if (this.$route.name === "editInventory") {
  1057. /* params.contract_product_list.map(el=>{
  1058. el.product_id=el.id
  1059. el.goods_id=el.id
  1060. })
  1061. params.product_list.map(el=>{
  1062. el.product_id=el.id
  1063. el.goods_id=el.id
  1064. }) */
  1065. API_GoodsExchange.editWarehouseEntry(id, params).then(
  1066. (response) => {
  1067. this.$message.success("修改成功!");
  1068. const { callback } = this.$route.params;
  1069. if (typeof callback === "function") callback();
  1070. this.$store.dispatch("delCurrentViews", {
  1071. view: this.$route,
  1072. $router: this.$router,
  1073. });
  1074. this.$router.push({
  1075. name: "goodsExchange",
  1076. params: { type: "second" },
  1077. });
  1078. }
  1079. );
  1080. } else if (this.$route.name === "addInventory") {
  1081. // 新增入库
  1082. API_GoodsExchange.warehouseEntry(params).then(() => {
  1083. this.$message.success("添加成功!");
  1084. const { callback } = this.$route.params;
  1085. if (typeof callback === "function") callback();
  1086. this.$store.dispatch("delCurrentViews", {
  1087. view: this.$route,
  1088. $router: this.$router,
  1089. });
  1090. this.$router.push({
  1091. name: "goodsExchange",
  1092. params: { type: "second" },
  1093. });
  1094. });
  1095. }
  1096. }
  1097. });
  1098. },
  1099. /* returngoodsExchangeAddForm() {
  1100. const { id } = this.goodsExchangeAddForm;
  1101. const params = this.MixinClone(this.goodsExchangeAddForm);
  1102. params.dept_name = this.deptListAll.find(
  1103. (dept) => dept.id === params.dept_id
  1104. ).name;
  1105. params.staff_name = this.goodsExchangeAddForm.distribution_name;
  1106. params.warehouse_name = this.warehouseList.find(
  1107. (ware) => ware.id === params.warehouse_id
  1108. ).name;
  1109. params.change_time = Math.floor(params.change_time / 1000);
  1110. params.product_list = params.product_list.map((item) => {
  1111. //change_list
  1112. item.product_sn = item.product_sn;
  1113. item.product_name = item.product_name;
  1114. item.specification = item.product_specification;
  1115. item.product_id = item.product_id;
  1116. item.unit = item.unit;
  1117. item.stock_sn = item.sn;
  1118. item.stock_num = item.remain_num;
  1119. item.cost_price = item.product_cost_price;
  1120. return item;
  1121. });
  1122. API_GoodsExchange.returnGoodsExchange(id, params).then(() => {
  1123. this.$message.success("换货成功!");
  1124. const { callback } = this.$route.params;
  1125. if (typeof callback === "function") callback();
  1126. this.$store.dispatch("delCurrentViews", {
  1127. view: this.$route,
  1128. $router: this.$router,
  1129. });
  1130. this.$router.push({ name: "goodsExchange" });
  1131. });
  1132. }, */
  1133. // 选择入库商品明细
  1134. async handleSelectWarehouseEntryBatch() {
  1135. if (!this.goodsExchangeAddForm.warehouse_id) {
  1136. this.$message.error("请先选择仓库!");
  1137. return;
  1138. }
  1139. API_GoodsExchange.getGoodsInfo(
  1140. this.params,
  1141. this.goodsExchangeAddForm.warehouse_id
  1142. ).then((res) => {
  1143. let item = {};
  1144. res.records.map((el) => {
  1145. item.sn = el.goods_vo.sn;
  1146. item.name = el.goods_vo.name;
  1147. return item;
  1148. });
  1149. this.goodsData = res.records;
  1150. this.goodsVisible = true;
  1151. });
  1152. /* if (!this.goodsExchangeAddForm.warehouse_id) {
  1153. this.$message.error('请先选择仓库!')
  1154. return
  1155. }
  1156. const goodsData = await this.$EnwarehouseEntryBatch({
  1157. goodsApi: "/admin/erp/goods",
  1158. warehouseList: this.warehouseList,
  1159. //change_list
  1160. selectedIds: this.id
  1161. ? this.goodsExchangeAddForm.product_list &&
  1162. this.goodsExchangeAddForm.product_list.map((item) => item.id)
  1163. : this.goodsExchangeAddForm.product_list.map((item) => item.id),
  1164. purchasePlanApiParams: {
  1165. warehouse_id: this.goodsExchangeAddForm.warehouse_id,
  1166. },
  1167. });
  1168. this.goodsExchangeAddForm.warehouse_id = goodsData.warehouse_id;
  1169. this.goodsExchangeAddForm.product_list = goodsData.purchasePlans.map(
  1170. (item) => {
  1171. item.amount = item.entry_price;
  1172. item.product_sn = item.product_sn;
  1173. item.product_name = item.product_name;
  1174. item.specification = item.product_specification;
  1175. item.product_id = item.product_id;
  1176. item.unit = item.product_unit;
  1177. item.stock_sn = item.warehouse_entry_sn;
  1178. item.stock_id = item.warehouse_entry_id;
  1179. item.stock_batch_sn = item.sn;
  1180. item.stock_batch_id = item.id;
  1181. item.cost_price = item.product_cost_price;
  1182. return item;
  1183. }
  1184. );
  1185. this.goodsExchangeAddForm.change_amount =
  1186. this.goodsExchangeAddForm.product_list.reduce(
  1187. (sum, obj) => sum + obj.entry_price,
  1188. 0
  1189. ); */
  1190. },
  1191. /** 选择订单编号 */
  1192. async handleSelectOrderSn() {
  1193. const orders = await this.$EnPickerOrder({
  1194. orderApi: "admin/erp/order",
  1195. selectedIds: [this.goodsExchangeAddForm.order_sn],
  1196. limit: 1,
  1197. });
  1198. this.$set(
  1199. this.goodsExchangeAddForm,
  1200. "distribution_name",
  1201. orders[0].distribution_name
  1202. );
  1203. const orderIds = orders.map((v) => v.sn);
  1204. this.$set(this.goodsExchangeAddForm, "order_sn", orderIds.join(","));
  1205. this.GET_WarehouseOutProduct();
  1206. },
  1207. /** 获取入库单商品明细 */
  1208. async GET_WarehouseOutProduct() {
  1209. const res = await API_Erp.getWarehouseOutProduct({
  1210. order_sn: this.goodsExchangeAddForm.order_sn,
  1211. });
  1212. this.goodsExchangeAddForm.return_list = res.data.map((item) => {
  1213. item.amount = item.product_price;
  1214. item.product_sn = item.product_sn;
  1215. item.product_name = item.product_name;
  1216. item.specification = item.product_specification;
  1217. item.product_id = item.product_id;
  1218. item.unit = item.product_unit;
  1219. item.num = item.return_num;
  1220. item.stock_sn = item.warehouse_entry_sn;
  1221. item.cost_price = item.product_cost_price;
  1222. return item;
  1223. });
  1224. },
  1225. /** 获取部门 */
  1226. GET_DeptList() {
  1227. API_GoodsExchange.getInfo().then((response) => {
  1228. this.deptListAll = response;
  1229. this.deptListAll.password = "";
  1230. });
  1231. },
  1232. /** 切换仓库 */
  1233. handleChangeWareHouse(val) {
  1234. //this.goodsExchangeAddForm.product_list = []change_list
  1235. },
  1236. /** 获取详情页面数据 */
  1237. GET_goodsExchangeAddDetail() {
  1238. this.$nextTick(() => {
  1239. API_GoodsExchange.getGoodsExchangeInfo(this.id).then((response) => {
  1240. this.goodsExchangeAddForm = response;
  1241. this.GET_WarehouseList({ dept_id: response.dept_id });
  1242. this.goodsExchangeAddForm.change_time = Math.floor(
  1243. this.goodsExchangeAddForm.change_time * 1000
  1244. );
  1245. response.product_list.map(el=>{
  1246. if(!el.sn_code_list){
  1247. el.sn_code_list=[]
  1248. }
  1249. })
  1250. this.goodsExchangeAddForm.distribution_name = response.staff_name;
  1251. this.goodsExchangeAddForm.product_list =
  1252. response.product_list;
  1253. /* .map((item) => {
  1254. //change_list
  1255. item.name=item.goods_do.name
  1256. item.sn=item.goods_do.sn
  1257. item.sn_code=item.goods_do.sn_code
  1258. item.bar_code=item.goods_do.bar_code
  1259. item.entry_price = item.amount;
  1260. item.product_specification = item.specification;
  1261. item.product_unit = item.unit;
  1262. item.warehouse_entry_sn = item.stock_sn;
  1263. return item;
  1264. }); */
  1265. /* this.goodsExchangeAddForm.return_list = response.return_list.map(
  1266. (item) => {
  1267. item.product_price = item.amount;
  1268. item.product_specification = item.specification;
  1269. item.product_unit = item.unit;
  1270. item.return_num = item.num;
  1271. item.warehouse_entry_sn = item.stock_sn;
  1272. return item;
  1273. }
  1274. ); */
  1275. // this.GET_WarehouseOutProduct()
  1276. });
  1277. });
  1278. },
  1279. },
  1280. };
  1281. </script>
  1282. <style type="text/scss" lang="scss" scoped>
  1283. /deep/ {
  1284. }
  1285. /** 底部步骤 */
  1286. .footer {
  1287. width: 100%;
  1288. padding: 10px;
  1289. bottom: 0px;
  1290. text-align: center;
  1291. z-index: 999;
  1292. }
  1293. .mx {
  1294. display: flex;
  1295. align-items: center;
  1296. width: 100%;
  1297. .button {
  1298. margin-left: 10px;
  1299. }
  1300. }
  1301. .change-form {
  1302. display: flex;
  1303. justify-content: flex-start;
  1304. align-items: flex-start;
  1305. flex-wrap: wrap;
  1306. min-width: 900px;
  1307. .change-form-item {
  1308. width: 30%;
  1309. margin: 0 10px 20px 0;
  1310. display: flex;
  1311. flex-direction: row;
  1312. flex-wrap: nowrap;
  1313. }
  1314. /deep/ {
  1315. .el-form-item__content {
  1316. flex: 1;
  1317. width: 100%;
  1318. }
  1319. .el-date-editor,
  1320. .el-cascader,
  1321. .el-select {
  1322. width: 100%;
  1323. }
  1324. }
  1325. }
  1326. .bg-in-stock {
  1327. background-color: #fff;
  1328. margin: 10px;
  1329. padding: 25px;
  1330. }
  1331. .goods-info {
  1332. display: flex;
  1333. .goods-name-box {
  1334. text-align: left;
  1335. .goods-name {
  1336. text-overflow: ellipsis;
  1337. display: -webkit-box;
  1338. -webkit-line-clamp: 2;
  1339. -webkit-box-orient: vertical;
  1340. overflow: hidden;
  1341. line-height: 16px;
  1342. }
  1343. .specs {
  1344. color: #999999;
  1345. }
  1346. }
  1347. }
  1348. .sn-code-container {
  1349. max-height: 150px; /* 设置最大高度,超过这个高度将显示滚动条 */
  1350. overflow-y: auto; /* 垂直方向上溢出时显示滚动条 */
  1351. }
  1352. /deep/ {
  1353. .el-input--suffix .el-input__inner {
  1354. padding-right: 10px;
  1355. }
  1356. .error-input {
  1357. .el-input__inner {
  1358. border: 1px solid red;
  1359. }
  1360. }
  1361. }
  1362. </style>