baseForm.vue 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058
  1. <template>
  2. <el-form
  3. :model="ruleForm"
  4. status-icon
  5. :rules="rulesThis"
  6. ref="ruleForm"
  7. :size="'mini'"
  8. v-loading="loading"
  9. label-width="110px"
  10. >
  11. <el-row class="ddiv">
  12. <el-col :span="1" class="dtitle">
  13. <ul style="padding: 140px 0 0 0">
  14. <li>基</li>
  15. <li>础</li>
  16. <li>信</li>
  17. <li>息</li>
  18. </ul>
  19. </el-col>
  20. <el-col :span="23" class="dmain">
  21. <el-row>
  22. <el-col :span="12">
  23. <el-form-item label="商品分类" prop="cat_id">
  24. <search-sort
  25. :value="ruleForm.cat_id"
  26. :placeholder="'商品分类'"
  27. :disabled="
  28. type === 'view' || type === 'editBase' || type === 'editCoin'
  29. "
  30. :size="'mini'"
  31. :names="cat_id_name"
  32. :isDetail="type !== 'add'"
  33. @searchChange="goods_class_change"
  34. />
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <el-form-item label="商品名称" prop="good_name">
  39. <el-input
  40. placeholder="商品名称"
  41. maxlength="100"
  42. :disabled="type === 'view' || type === 'editCoin'"
  43. v-model="ruleForm.good_name"
  44. ></el-input>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="12">
  48. <el-form-item label="业务公司" prop="company_id">
  49. <search-work-company
  50. :value="ruleForm.company_id"
  51. :placeholder="'业务公司'"
  52. :disabled="
  53. type === 'view' || type === 'editBase' || type === 'editCoin'
  54. "
  55. :size="'mini'"
  56. :isDetail="type !== 'add'"
  57. @searchChange="company_idsearchChange"
  58. />
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="12">
  62. <el-form-item label="供应商" prop="supplierNo">
  63. <search-supplier
  64. :value="ruleForm.supplierNo"
  65. :placeholder="'供应商'"
  66. :disabled="type === 'view' || type === 'editCoin'"
  67. :size="'mini'"
  68. :names="supplierName"
  69. :isDetail="type !== 'add'"
  70. @searchChange="supplierNosearchChange"
  71. />
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="8">
  75. <el-form-item label="商品品牌" prop="brandid">
  76. <search-brand
  77. :value="ruleForm.brandid"
  78. :disabled="type === 'view' || type === 'editCoin'"
  79. :size="'mini'"
  80. :isDetail="type !== 'add'"
  81. :names="brand_name"
  82. :placeholder="'商品品牌'"
  83. @searchChange="brandidsearchChange"
  84. />
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="8">
  88. <el-form-item label="销售权限" prop="is_auth">
  89. <el-select
  90. v-model="ruleForm.is_auth"
  91. filterable
  92. clearable
  93. :disabled="type === 'view' || type === 'editCoin'"
  94. style="width: 100%"
  95. placeholder="销售权限"
  96. >
  97. <el-option
  98. v-for="group in options3"
  99. :key="group.id"
  100. :label="group.name"
  101. :value="group.id"
  102. />
  103. </el-select>
  104. </el-form-item>
  105. </el-col>
  106. <el-col :span="4">
  107. <el-form-item label="单位" prop="unit" label-width="60px">
  108. <search-unit
  109. :value="ruleForm.unit"
  110. :disabled="type === 'view' || type === 'editCoin'"
  111. :size="'mini'"
  112. :isDetail="type !== 'add'"
  113. :names="unit_name"
  114. :placeholder="'单位'"
  115. @searchChange="unitsearchChange"
  116. />
  117. </el-form-item>
  118. </el-col>
  119. <el-col :span="4">
  120. <el-form-item label="税点" prop="tax" label-width="60px">
  121. <search-tax
  122. :value="ruleForm.tax"
  123. :disabled="
  124. type === 'view' || type === 'editBase' || type === 'editCoin'
  125. "
  126. :size="'mini'"
  127. :isDetail="type !== 'add'"
  128. :placeholder="'税点'"
  129. @searchChange="taxsearchChange"
  130. />
  131. </el-form-item>
  132. </el-col>
  133. <el-col :span="8">
  134. <el-form-item label="专属类型" prop="is_exclusive">
  135. <search-exclusive
  136. :disabled="type === 'view' || type === 'editCoin'"
  137. style="width: 100%"
  138. :isDetail="type !== 'add'"
  139. :size="'mini'"
  140. placeholder="专属类型"
  141. :value="ruleForm.is_exclusive"
  142. @selectChange="exclusiveSearchChange"
  143. />
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="8">
  147. <el-form-item label="商品总重量" prop="weight">
  148. <digital-input
  149. :values="ruleForm.weight"
  150. :name="'ruleForm.weight'"
  151. :placeholder="'商品总重量'"
  152. :min="0"
  153. :disabled="type === 'view' || type === 'editCoin'"
  154. :max="100000000000"
  155. :position="'right'"
  156. :precision="3"
  157. :size="'mini'"
  158. :controls="false"
  159. :append="'g'"
  160. @reschange="number_change($event, 'weight')"
  161. />
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="8">
  165. <el-form-item label="是否库存品" prop="is_stock">
  166. <el-select
  167. v-model="ruleForm.is_stock"
  168. filterable
  169. clearable
  170. :disabled="
  171. type === 'view' || type === 'editBase' || type === 'editCoin'
  172. "
  173. style="width: 100%"
  174. placeholder="是否库存品"
  175. >
  176. <el-option
  177. v-for="group in options4"
  178. :key="group.id"
  179. :label="group.name"
  180. :value="group.id"
  181. />
  182. </el-select>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="24" v-show="is_noble">
  186. <el-row>
  187. <el-col :span="8">
  188. <el-form-item label="贵金属重量" prop="noble_weight">
  189. <digital-input
  190. :values="ruleForm.noble_weight"
  191. :placeholder="'贵金属重量'"
  192. :name="'ruleForm.noble_weight'"
  193. :min="0"
  194. :disabled="
  195. type === 'view' ||
  196. type === 'editBase' ||
  197. type === 'editCoin'
  198. "
  199. :max="100000000000"
  200. :position="'right'"
  201. :precision="3"
  202. :size="'mini'"
  203. :controls="false"
  204. :append="'g'"
  205. @reschange="number_change($event, 'noble_weight')"
  206. />
  207. </el-form-item>
  208. </el-col>
  209. <el-col :span="8">
  210. <el-form-item label="贵金属种类" prop="noble_metal">
  211. <search-metal-kind
  212. :value="ruleForm.noble_metal"
  213. :disabled="
  214. type === 'view' ||
  215. type === 'editBase' ||
  216. type === 'editCoin'
  217. "
  218. :size="'mini'"
  219. :isDetail="type !== 'add'"
  220. :placeholder="'贵金属种类'"
  221. @searchChange="noble_metalsearchChange"
  222. />
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="8">
  226. <el-form-item label="启用实时金价" prop="is_gold_price">
  227. <el-select
  228. v-model="ruleForm.is_gold_price"
  229. filterable
  230. clearable
  231. :disabled="
  232. type === 'view' ||
  233. type === 'editBase' ||
  234. type === 'editCoin'
  235. "
  236. style="width: 100%"
  237. placeholder="启用实时金价"
  238. >
  239. <el-option
  240. v-for="group in options5"
  241. :key="group.id"
  242. :label="group.name"
  243. :value="group.id"
  244. />
  245. </el-select>
  246. </el-form-item>
  247. </el-col>
  248. <el-col :span="6">
  249. <el-form-item label="有无工差" prop="is_diff">
  250. <el-select
  251. v-model="ruleForm.is_diff"
  252. filterable
  253. clearable
  254. :disabled="
  255. type === 'view' ||
  256. type === 'editBase' ||
  257. type === 'editCoin'
  258. "
  259. style="width: 100%"
  260. placeholder="有无工差"
  261. >
  262. <el-option
  263. v-for="group in options8"
  264. :key="group.id"
  265. :label="group.name"
  266. :value="group.id"
  267. />
  268. </el-select>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="10">
  272. <el-form-item label="配置要求" prop="config" label-width="85px">
  273. <el-select
  274. v-model="ruleForm.config"
  275. multiple
  276. :disabled="type === 'view'"
  277. style="width: 100%"
  278. placeholder="配置要求"
  279. >
  280. <el-option
  281. v-for="(item, index) in options9"
  282. :key="item + index"
  283. :label="item"
  284. :value="item"
  285. >
  286. </el-option>
  287. </el-select>
  288. </el-form-item>
  289. </el-col>
  290. <el-col :span="8">
  291. <el-form-item label="其他配置要求" prop="other_config">
  292. <el-input
  293. placeholder="其他配置要求"
  294. maxlength="100"
  295. :disabled="type === 'view'"
  296. v-model="ruleForm.other_config"
  297. >
  298. </el-input>
  299. </el-form-item>
  300. </el-col>
  301. </el-row>
  302. </el-col>
  303. <el-col :span="8">
  304. <el-form-item label="售后说明" prop="after_sales">
  305. <el-input
  306. type="textarea"
  307. :rows="4"
  308. :disabled="type === 'view' || type === 'editCoin'"
  309. placeholder="售后说明"
  310. v-model="ruleForm.after_sales"
  311. >
  312. </el-input>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="8">
  316. <el-form-item label="商品备注" prop="good_remark">
  317. <el-input
  318. type="textarea"
  319. :rows="4"
  320. :disabled="type === 'view' || type === 'editCoin'"
  321. placeholder="商品备注"
  322. v-model="ruleForm.good_remark"
  323. >
  324. </el-input>
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="8">
  328. <el-form-item label="工艺说明" prop="craft_desc">
  329. <el-input
  330. type="textarea"
  331. :disabled="type === 'view' || type === 'editCoin'"
  332. :rows="4"
  333. placeholder="工艺说明"
  334. v-model="ruleForm.craft_desc"
  335. >
  336. </el-input>
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="8">
  340. <el-form-item label="是否定制" prop="good_type">
  341. <el-select
  342. v-model="ruleForm.good_type"
  343. filterable
  344. :disabled="
  345. type === 'view' || type === 'editBase' || type === 'editCoin'
  346. "
  347. clearable
  348. style="width: 100%"
  349. placeholder="是否定制"
  350. @change="good_type_change"
  351. >
  352. <el-option
  353. v-for="group in options1"
  354. :key="group.id"
  355. :label="group.name"
  356. :value="group.id"
  357. />
  358. </el-select>
  359. </el-form-item>
  360. </el-col>
  361. <el-col :span="8" v-show="ruleForm.good_type === '1'">
  362. <el-form-item label="定制起订量" prop="moq">
  363. <digital-input
  364. :values="ruleForm.moq"
  365. :placeholder="'定制起订量'"
  366. :name="'ruleForm.moq'"
  367. :min="0"
  368. :disabled="type === 'view' || type === 'editBase'"
  369. :max="100000000000"
  370. :position="'right'"
  371. :precision="0"
  372. :size="'mini'"
  373. :controls="false"
  374. :append="''"
  375. @reschange="number_change($event, 'moq')"
  376. />
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="8" v-show="ruleForm.good_type === '1'">
  380. <el-form-item label="定制工期" prop="customized">
  381. <digital-input
  382. :values="ruleForm.customized"
  383. :placeholder="'定制工期'"
  384. :name="'ruleForm.customized'"
  385. :min="0"
  386. :disabled="type === 'view' || type === 'editBase'"
  387. :max="100000000000"
  388. :position="'right'"
  389. :precision="0"
  390. :size="'mini'"
  391. :controls="false"
  392. :append="'天'"
  393. @reschange="number_change($event, 'customized')"
  394. />
  395. </el-form-item>
  396. </el-col>
  397. </el-row>
  398. </el-col>
  399. </el-row>
  400. <el-row class="ddiv">
  401. <el-col :span="1" class="dtitle">
  402. <ul>
  403. <li>规</li>
  404. <li>格</li>
  405. <li>信</li>
  406. <li>息</li>
  407. </ul>
  408. </el-col>
  409. <el-col :span="23" class="dmain" style="padding: 20px 0 20px 18px">
  410. <el-table
  411. :data="spec_tableData"
  412. :size="'mini'"
  413. border
  414. style="width: 100%"
  415. >
  416. <el-table-column prop="spec_value" label="规格类型" />
  417. <el-table-column prop="spec_value_value" label="规格值" />
  418. <el-table-column
  419. fixed="right"
  420. v-if="type === 'add' || type === 'editBase' || type === 'edit'"
  421. >
  422. <template slot="header" slot-scope="scope">
  423. <span>操作</span>
  424. <el-tooltip
  425. class="item"
  426. effect="dark"
  427. content="添加规格类型"
  428. placement="top"
  429. >
  430. <i
  431. class="el-icon-circle-plus-outline fr"
  432. style="font-size: 18px; margin-top: 2px"
  433. @click="openEdit('-1', {})"
  434. />
  435. </el-tooltip>
  436. </template>
  437. <template slot-scope="scope">
  438. <el-tooltip effect="dark" content="修改" placement="top">
  439. <i
  440. class="el-icon-edit tb-icon"
  441. @click="openEdit(scope.$index, scope.row)"
  442. ></i>
  443. </el-tooltip>
  444. <el-tooltip
  445. v-if="!scope.row.isMust"
  446. effect="dark"
  447. content="删除"
  448. placement="top"
  449. >
  450. <i
  451. class="el-icon-delete tb-icon"
  452. @click="openDelete(scope.$index)"
  453. ></i>
  454. </el-tooltip>
  455. </template>
  456. </el-table-column>
  457. </el-table>
  458. <!-- 弹窗 新增/修改 -->
  459. <base-form-add-edit
  460. :index="modelIndex"
  461. :show-model="showModel"
  462. :sitem="sitem"
  463. @refresh="refreshEdit"
  464. @cancel="showModel = false"
  465. />
  466. </el-col>
  467. </el-row>
  468. <el-row class="ddiv">
  469. <el-col :span="1" class="dtitle">
  470. <ul>
  471. <li>包</li>
  472. <li>装</li>
  473. <li>信</li>
  474. <li>息</li>
  475. </ul></el-col
  476. >
  477. <el-col :span="23" class="dmain">
  478. <el-row>
  479. <el-col :span="6">
  480. <el-form-item label="包装方式" prop="packing_way">
  481. <el-input
  482. placeholder="包装方式"
  483. :disabled="type === 'view' || type === 'editCoin'"
  484. v-model="ruleForm.packing_way"
  485. maxlength="250"
  486. />
  487. </el-form-item>
  488. </el-col>
  489. <el-col :span="6">
  490. <el-form-item label="装箱规格" prop="packing_spec">
  491. <el-input
  492. placeholder="装箱规格"
  493. :disabled="type === 'view' || type === 'editCoin'"
  494. v-model="ruleForm.packing_spec"
  495. maxlength="250"
  496. />
  497. </el-form-item>
  498. </el-col>
  499. <el-col :span="6">
  500. <el-form-item label="装箱重量" prop="packing_weight">
  501. <digital-input
  502. :values="ruleForm.packing_weight"
  503. :placeholder="'装箱重量'"
  504. :min="0"
  505. :name="'ruleForm.packing_weight'"
  506. :disabled="type === 'view' || type === 'editCoin'"
  507. :max="100000000000"
  508. :position="'right'"
  509. :precision="3"
  510. :size="'mini'"
  511. :controls="false"
  512. :append="'g'"
  513. @reschange="number_change($event, 'packing_weight')"
  514. />
  515. </el-form-item>
  516. </el-col>
  517. <el-col :span="6">
  518. <el-form-item label="装箱尺寸" prop="packing_size">
  519. <el-input
  520. placeholder="装箱尺寸"
  521. :disabled="type === 'view' || type === 'editCoin'"
  522. v-model="ruleForm.packing_size"
  523. maxlength="250"
  524. />
  525. </el-form-item>
  526. </el-col>
  527. <el-col :span="6">
  528. <el-form-item label="商品尺寸" prop="good_size">
  529. <el-input
  530. placeholder="商品尺寸"
  531. :disabled="type === 'view' || type === 'editCoin'"
  532. v-model="ruleForm.good_size"
  533. maxlength="250"
  534. />
  535. </el-form-item>
  536. </el-col>
  537. <el-col :span="6">
  538. <el-form-item label="商品条形码" prop="good_bar">
  539. <el-input
  540. placeholder="商品条形码"
  541. :disabled="type === 'view' || type === 'editCoin'"
  542. v-model="ruleForm.good_bar"
  543. type="number"
  544. :min="0"
  545. :max="9999999999999"
  546. :step="0"
  547. />
  548. </el-form-item>
  549. </el-col>
  550. <el-col :span="12">
  551. <el-form-item label="包装清单" prop="packing_list">
  552. <el-input
  553. placeholder="包装清单"
  554. :disabled="type === 'view' || type === 'editCoin'"
  555. v-model="ruleForm.packing_list"
  556. maxlength="250"
  557. />
  558. </el-form-item>
  559. </el-col>
  560. </el-row>
  561. </el-col>
  562. </el-row>
  563. <el-row class="ddiv">
  564. <el-col :span="1" class="dtitle">
  565. <ul>
  566. <li>发</li>
  567. <li>货</li>
  568. <li>信</li>
  569. <li>息</li>
  570. </ul></el-col
  571. >
  572. <el-col :span="23" class="dmain">
  573. <el-row>
  574. <el-col :span="8">
  575. <el-form-item label="供货区域" prop="supply_area">
  576. <el-select
  577. v-model="ruleForm.supply_area"
  578. filterable
  579. clearable
  580. :disabled="type === 'view' || type === 'editCoin'"
  581. style="width: 100%"
  582. placeholder="供货区域"
  583. >
  584. <el-option
  585. v-for="group in options6"
  586. :key="group.id"
  587. :label="group.name"
  588. :value="group.id"
  589. />
  590. </el-select>
  591. </el-form-item>
  592. </el-col>
  593. <el-col :span="8">
  594. <el-form-item label="发货地" prop="delivery_place">
  595. <select-area
  596. :placeholder="'发货地'"
  597. :value="ruleForm.delivery_place"
  598. :is-detail="id !== 'add'"
  599. :disabled="type === 'view' || type === 'editCoin'"
  600. :size="'mini'"
  601. @selectChange="selectAreadelivery_place"
  602. />
  603. </el-form-item>
  604. </el-col>
  605. <el-col :span="8">
  606. <el-form-item label="产地" prop="origin_place">
  607. <select-area
  608. :placeholder="'产地'"
  609. :value="ruleForm.origin_place"
  610. :size="'mini'"
  611. :is-detail="id !== 'add'"
  612. :disabled="type === 'view' || type === 'editCoin'"
  613. @selectChange="selectAreaorigin_place"
  614. />
  615. </el-form-item>
  616. </el-col>
  617. <el-col :span="8">
  618. <el-form-item label="物流时间" prop="delivery_day">
  619. <digital-input
  620. :values="ruleForm.delivery_day"
  621. :placeholder="'物流时间'"
  622. :min="0"
  623. :name="'ruleForm.delivery_day'"
  624. :disabled="type === 'view' || type === 'editCoin'"
  625. :max="100000000000"
  626. :position="'right'"
  627. :precision="0"
  628. :size="'mini'"
  629. :controls="false"
  630. :append="'天'"
  631. @reschange="number_change($event, 'delivery_day')"
  632. />
  633. </el-form-item>
  634. </el-col>
  635. <el-col :span="8">
  636. <el-form-item label="供货周期" prop="lead_time">
  637. <digital-input
  638. :values="ruleForm.lead_time"
  639. :placeholder="'物流时间'"
  640. :min="0"
  641. :name="'ruleForm.lead_time'"
  642. :disabled="type === 'view' || type === 'editCoin'"
  643. :max="100000000000"
  644. :position="'right'"
  645. :precision="0"
  646. :size="'mini'"
  647. :controls="false"
  648. :append="'天'"
  649. @reschange="number_change($event, 'lead_time')"
  650. />
  651. </el-form-item>
  652. </el-col>
  653. <el-col :span="8">
  654. <el-form-item label="调样周期" prop="sample_day">
  655. <digital-input
  656. :values="ruleForm.sample_day"
  657. :placeholder="'调样周期'"
  658. :min="0"
  659. :name="'ruleForm.sample_day'"
  660. :disabled="type === 'view' || type === 'editCoin'"
  661. :max="100000000000"
  662. :position="'right'"
  663. :precision="0"
  664. :size="'mini'"
  665. :controls="false"
  666. :append="'天'"
  667. @reschange="number_change($event, 'sample_day')"
  668. />
  669. </el-form-item>
  670. </el-col>
  671. </el-row>
  672. </el-col>
  673. </el-row>
  674. <el-row class="ddiv">
  675. <el-col :span="1" class="dtitle">
  676. <ul>
  677. <li>图</li>
  678. <li>片</li>
  679. <li>信</li>
  680. <li>息</li>
  681. </ul></el-col
  682. >
  683. <el-col :span="23" class="dmain">
  684. <el-row style="padding: 0 0 20px 0">
  685. <el-col :span="8">
  686. <el-form-item
  687. label="商品主图"
  688. prop="good_thumb_img"
  689. class="activity-upload"
  690. >
  691. <div class="btnupload" style="position: relative">
  692. <img
  693. v-if="ruleForm.good_thumb_img"
  694. :src="ruleForm.good_thumb_img"
  695. class="avatar"
  696. />
  697. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  698. <file-upload
  699. class="Upload"
  700. :disabled="type === 'view' || type === 'editCoin'"
  701. :accept="'.jpg,.png,.jpeg'"
  702. :multiple="true"
  703. :uploadcondition="beforeAvatarUpload"
  704. @UploadErrorEvent="UploadErrorEventgood_thumb_img"
  705. @UploadSuccessEvent="UploadSuccessEventgood_thumb_img"
  706. ></file-upload>
  707. </div>
  708. <div class="txt-tips fl">
  709. <p>尺寸比例:</p>
  710. <p>1:1</p>
  711. </div>
  712. </el-form-item>
  713. <div style="font-size: 12px; color: #606266">
  714. <span style="padding: 0 0 0 20px">图片大小:小于1M</span>
  715. <span style="padding: 0 0 0 20px">图片类型.jpg/png/jpeg</span>
  716. </div>
  717. </el-col>
  718. <el-col :span="16">
  719. <el-form-item label="详情介绍图" prop="good_info_img">
  720. <div class="good_info_img_div">
  721. <ul v-if="ruleForm.good_info_img" class="clear">
  722. <li
  723. class="img-show-li"
  724. v-viewer
  725. v-for="(img, iindex) in ruleForm.good_info_img"
  726. :key="img + iindex"
  727. >
  728. <div class="img-show-li-div">
  729. <img :src="img" class="img-show" alt="" />
  730. <i
  731. v-if="type == 'add' || type === 'editBase'"
  732. class="el-icon-close"
  733. @click="closeImg(iindex)"
  734. ></i>
  735. </div>
  736. </li>
  737. <li
  738. class="img-show-li"
  739. v-if="
  740. ruleForm.good_info_img.length < 10 &&
  741. (type == 'add' || type === 'editBase')
  742. "
  743. >
  744. <div class="activity-upload">
  745. <div class="btnupload" style="position: relative">
  746. <i class="el-icon-plus avatar-uploader-icon"></i>
  747. <file-upload
  748. class="Upload"
  749. :disabled="type === 'view' || type === 'editCoin'"
  750. :accept="'.jpg,.png,.jpeg'"
  751. :multiple="true"
  752. :uploadcondition="beforeAvatarUpload"
  753. @UploadErrorEvent="UploadErrorEventgood_info_img"
  754. @UploadSuccessEvent="UploadSuccessEventgood_info_img"
  755. ></file-upload>
  756. </div>
  757. </div>
  758. </li>
  759. </ul>
  760. </div>
  761. </el-form-item>
  762. </el-col>
  763. </el-row>
  764. </el-col>
  765. </el-row>
  766. <el-row class="ddiv">
  767. <el-col :span="1" class="dtitle">
  768. <ul style="padding: 30px 0 0 0">
  769. <li>固</li>
  770. <li>定</li>
  771. <li>成</li>
  772. <li>本</li>
  773. </ul></el-col
  774. >
  775. <el-col :span="23" class="dmain">
  776. <el-row>
  777. <el-col :span="8">
  778. <el-form-item label="证书费" prop="cert_fee">
  779. <digital-input
  780. :values="ruleForm.cert_fee"
  781. :placeholder="'证书费'"
  782. :min="0"
  783. :name="'ruleForm.cert_fee'"
  784. :disabled="type === 'view' || type === 'editBase'"
  785. :max="100000000000"
  786. :position="'right'"
  787. :precision="2"
  788. :size="'mini'"
  789. :controls="false"
  790. :append="'元'"
  791. @reschange="number_change($event, 'cert_fee')"
  792. />
  793. </el-form-item>
  794. </el-col>
  795. <el-col :span="8">
  796. <el-form-item label="包装费" prop="packing_fee">
  797. <digital-input
  798. :values="ruleForm.packing_fee"
  799. :placeholder="'包装费'"
  800. :min="0"
  801. :name="'ruleForm.packing_fee'"
  802. :disabled="type === 'view' || type === 'editBase'"
  803. :max="100000000000"
  804. :position="'right'"
  805. :precision="2"
  806. :size="'mini'"
  807. :controls="false"
  808. :append="'元'"
  809. @reschange="number_change($event, 'packing_fee')"
  810. />
  811. </el-form-item>
  812. </el-col>
  813. <el-col :span="8">
  814. <el-form-item label="工艺费" prop="cost_fee">
  815. <digital-input
  816. :values="ruleForm.cost_fee"
  817. :placeholder="'工艺费'"
  818. :min="0"
  819. :name="'ruleForm.cost_fee'"
  820. :disabled="type === 'view' || type === 'editBase'"
  821. :max="100000000000"
  822. :position="'right'"
  823. :precision="2"
  824. :size="'mini'"
  825. :controls="false"
  826. :append="'元'"
  827. @reschange="number_change($event, 'cost_fee')"
  828. />
  829. </el-form-item>
  830. </el-col>
  831. <el-col :span="8">
  832. <el-form-item label="加标费" prop="mark_fee">
  833. <digital-input
  834. :values="ruleForm.mark_fee"
  835. :placeholder="'加标费'"
  836. :min="0"
  837. :name="'ruleForm.mark_fee'"
  838. :disabled="type === 'view' || type === 'editBase'"
  839. :max="100000000000"
  840. :position="'right'"
  841. :precision="2"
  842. :size="'mini'"
  843. :controls="false"
  844. :append="'元'"
  845. @reschange="number_change($event, 'mark_fee')"
  846. />
  847. </el-form-item>
  848. </el-col>
  849. <el-col :span="8">
  850. <el-form-item label="打样费" prop="demo_fee">
  851. <digital-input
  852. :values="ruleForm.demo_fee"
  853. :placeholder="'打样费'"
  854. :min="0"
  855. :name="'ruleForm.demo_fee'"
  856. :disabled="type === 'view' || type === 'editBase'"
  857. :max="100000000000"
  858. :position="'right'"
  859. :precision="2"
  860. :size="'mini'"
  861. :controls="false"
  862. :append="'元'"
  863. @reschange="number_change($event, 'demo_fee')"
  864. />
  865. </el-form-item>
  866. </el-col>
  867. <el-col :span="8">
  868. <el-form-item label="开模费" prop="open_fee">
  869. <digital-input
  870. :values="ruleForm.open_fee"
  871. :placeholder="'开模费'"
  872. :min="0"
  873. :name="'ruleForm.open_fee'"
  874. :disabled="type === 'view' || type === 'editBase'"
  875. :max="100000000000"
  876. :position="'right'"
  877. :precision="2"
  878. :size="'mini'"
  879. :controls="false"
  880. :append="'元'"
  881. @reschange="number_change($event, 'open_fee')"
  882. />
  883. </el-form-item>
  884. </el-col>
  885. <el-col :span="8">
  886. <el-form-item label="调样费" prop="sample_fee">
  887. <digital-input
  888. :values="ruleForm.sample_fee"
  889. :placeholder="'调样费'"
  890. :min="0"
  891. :name="'ruleForm.sample_fee'"
  892. :disabled="type === 'view' || type === 'editBase'"
  893. :max="100000000000"
  894. :position="'right'"
  895. :precision="2"
  896. :size="'mini'"
  897. :controls="false"
  898. :append="'元'"
  899. @reschange="number_change($event, 'sample_fee')"
  900. />
  901. </el-form-item>
  902. </el-col>
  903. <el-col :span="8">
  904. <el-form-item label="市场价" prop="market_price">
  905. <digital-input
  906. :values="ruleForm.market_price"
  907. :placeholder="'市场价'"
  908. :min="0"
  909. :name="'ruleForm.market_price'"
  910. :disabled="type === 'view' || type === 'editBase'"
  911. :max="100000000000"
  912. :position="'right'"
  913. :precision="2"
  914. :size="'mini'"
  915. :controls="false"
  916. :append="'元'"
  917. @reschange="number_change($event, 'market_price')"
  918. />
  919. </el-form-item>
  920. </el-col>
  921. <el-col :span="8">
  922. <el-form-item label="裸价" prop="nake_price">
  923. <digital-input
  924. :values="ruleForm.nake_price"
  925. :placeholder="'裸价'"
  926. :min="0"
  927. :name="'ruleForm.nake_price'"
  928. :disabled="type === 'view' || type === 'editBase'"
  929. :max="100000000000"
  930. :position="'right'"
  931. :precision="2"
  932. :size="'mini'"
  933. :controls="false"
  934. :append="'元'"
  935. @reschange="number_change($event, 'nake_price')"
  936. />
  937. </el-form-item>
  938. </el-col>
  939. </el-row>
  940. </el-col>
  941. </el-row>
  942. <el-row class="ddiv">
  943. <el-col :span="1" class="dtitle">
  944. <ul>
  945. <li>阶</li>
  946. <li>梯</li>
  947. <li>成</li>
  948. <li>本</li>
  949. </ul></el-col
  950. >
  951. <el-col :span="23" class="dmain">
  952. <el-row>
  953. <el-col :span="8">
  954. <el-form-item label="启用阶梯" prop="is_step">
  955. <el-select
  956. v-model="ruleForm.is_step"
  957. filterable
  958. clearable
  959. :disabled="type === 'view' || type === 'editBase'"
  960. style="width: 100%"
  961. placeholder="启用阶梯"
  962. >
  963. <el-option
  964. v-for="group in options5"
  965. :key="group.id"
  966. :label="group.name"
  967. :value="group.id"
  968. />
  969. </el-select>
  970. </el-form-item>
  971. </el-col>
  972. <el-col :span="24" style="padding-left: 18px">
  973. <el-table
  974. :data="ladder_tableData"
  975. :size="'mini'"
  976. border
  977. stripe
  978. style="width: 100%; margin: 0 0 20px 0"
  979. >
  980. <el-table-column prop="min_num" label="起订量(>=)" />
  981. <el-table-column prop="nake_fee" label="成本合计" />
  982. <el-table-column prop="cost_fee" label="工艺费" />
  983. <el-table-column prop="delivery_fee" label="其中运费" />
  984. <el-table-column
  985. fixed="right"
  986. v-if="type === 'add' || type === 'editCoin' || type === 'edit'"
  987. >
  988. <template slot="header" slot-scope="scope">
  989. <span>操作</span>
  990. <el-tooltip effect="dark" content="添加阶梯" placement="top">
  991. <i
  992. class="el-icon-circle-plus-outline tb-icon fr"
  993. @click="openCostEdit(-1, {})"
  994. ></i>
  995. </el-tooltip>
  996. </template>
  997. <template slot-scope="scope">
  998. <el-tooltip effect="dark" content="修改" placement="top">
  999. <i
  1000. class="el-icon-edit tb-icon"
  1001. @click="openCostEdit(scope.$index, scope.row)"
  1002. ></i>
  1003. </el-tooltip>
  1004. <el-tooltip effect="dark" content="删除" placement="top">
  1005. <i
  1006. class="el-icon-delete tb-icon"
  1007. @click="openCostEditDelete(scope.$index)"
  1008. ></i>
  1009. </el-tooltip>
  1010. </template>
  1011. </el-table-column>
  1012. </el-table>
  1013. </el-col>
  1014. </el-row>
  1015. <!-- 弹窗 新增/修改 -->
  1016. <cost-form-add-edit
  1017. :index="costmodelIndex"
  1018. :show-model="costshowModel"
  1019. :sitem="costsitem"
  1020. @refresh="costrefreshEdit"
  1021. @cancel="costshowModel = false"
  1022. />
  1023. </el-col>
  1024. <el-col
  1025. :span="24"
  1026. v-if="
  1027. type === 'editBase' ||
  1028. type === 'add' ||
  1029. type === 'editCoin' ||
  1030. type === 'edit'
  1031. "
  1032. style="
  1033. text-align: right;
  1034. padding: 15px 0 15px 0;
  1035. border-top: 1px solid #dcdfe6;
  1036. "
  1037. >
  1038. <el-button :size="'mini'" type="primary" @click="submitForm"
  1039. >保 存
  1040. </el-button>
  1041. </el-col></el-row
  1042. >
  1043. </el-form>
  1044. </template>
  1045. <script>
  1046. import asyncRequest from "@/apis/service/goodStore/goodsCost";
  1047. import resToken from "@/mixins/resToken";
  1048. import { mapGetters } from "vuex";
  1049. import baseFormAddEdit from "./baseFormAddEdit";
  1050. import costFormAddEdit from "./costFormAddEdit";
  1051. import {
  1052. options1,
  1053. options2,
  1054. options3,
  1055. options4,
  1056. options5,
  1057. options6,
  1058. options7,
  1059. options8,
  1060. options9,
  1061. rules,
  1062. } from "../columns";
  1063. export default {
  1064. name: "goodsCostAdd",
  1065. mixins: [resToken],
  1066. props: ["showModel", "id", "type", "sitem"],
  1067. components: {
  1068. baseFormAddEdit,
  1069. costFormAddEdit,
  1070. },
  1071. computed: {
  1072. ...mapGetters(["tablebtnSize", "searchSize", "size"]),
  1073. powers() {
  1074. let tran =
  1075. this.$store.getters.btnList.find(
  1076. (item) => item.menu_route == "goodsCostAdd"
  1077. ) || {};
  1078. if (tran && tran.action && tran.action.length > 0) {
  1079. return tran.action;
  1080. } else {
  1081. return [];
  1082. }
  1083. },
  1084. },
  1085. watch: {
  1086. newTime: function (val) {
  1087. if (val) {
  1088. this.initForm();
  1089. }
  1090. },
  1091. },
  1092. data() {
  1093. return {
  1094. spec_tableData: [],
  1095. cat_id_name: "",
  1096. brand_name: "",
  1097. unit_name: "",
  1098. costshowModel: false,
  1099. costmodelIndex: "",
  1100. costsitem: {},
  1101. showModel: false,
  1102. modelIndex: "",
  1103. is_noble: false,
  1104. size: "small",
  1105. status: "",
  1106. rulesThis: this.rules,
  1107. activeName: "1",
  1108. loading: true,
  1109. supplierName: "",
  1110. options1: options1,
  1111. options2: options2,
  1112. options3: options3,
  1113. options4: options4,
  1114. options5: options5,
  1115. options6: options6,
  1116. options7: options7,
  1117. options8: options8,
  1118. options9: options9,
  1119. ruleForm: {},
  1120. spec_tableData: [],
  1121. old_spec_tableData: [],
  1122. ladder_tableData: [],
  1123. old_ladder_tableData: [],
  1124. rules: rules,
  1125. };
  1126. },
  1127. mounted() {
  1128. this.initForm();
  1129. },
  1130. methods: {
  1131. async initForm() {
  1132. this.loading = true;
  1133. this.resetFormData();
  1134. this.rulesThis = this.rules;
  1135. await this.resetForm();
  1136. this.sch_is_noble();
  1137. this.good_type_change();
  1138. this.loading = false;
  1139. },
  1140. number_change(e, key) {
  1141. this.ruleForm[key] = e + "" || "0";
  1142. this.$refs.ruleForm.validateField(key);
  1143. },
  1144. openEdit(index, sitem) {
  1145. this.modelIndex = index;
  1146. this.sitem = sitem;
  1147. this.showModel = true;
  1148. },
  1149. openCostEdit(index, sitem) {
  1150. this.costmodelIndex = index;
  1151. this.costsitem = sitem;
  1152. this.costshowModel = true;
  1153. },
  1154. openDelete(index) {
  1155. this.spec_tableData.splice(index, 1);
  1156. },
  1157. openCostEditDelete(index) {
  1158. this.ladder_tableData.splice(index, 1);
  1159. },
  1160. async submitForm() {
  1161. this.sch_is_noble();
  1162. this.good_type_change();
  1163. await this.$refs.ruleForm.validate(async (valid) => {
  1164. if (valid) {
  1165. this.loading = true;
  1166. if (this.spec_tableData.length === 0) {
  1167. this.$message.warning("请录入商品规格信息!");
  1168. this.loading = false;
  1169. return;
  1170. }
  1171. let isMust = true;
  1172. this.spec_tableData.forEach((e) => {
  1173. if (e.isMust && !e.spec_value_id) {
  1174. isMust = false;
  1175. }
  1176. });
  1177. if (!isMust) {
  1178. this.$message.warning("分类绑定的规格必须填写规格值!");
  1179. this.loading = false;
  1180. return;
  1181. }
  1182. if (this.ladder_tableData.length === 0) {
  1183. this.$message.warning("请录入阶梯成本!");
  1184. this.loading = false;
  1185. return;
  1186. }
  1187. const { noble_weight, weight, good_type, moq, is_step } =
  1188. this.ruleForm;
  1189. if (is_step === "0" && this.ladder_tableData.length > 1) {
  1190. this.$message.warning("不启用阶梯成本,只能录入一条阶梯成本信息!");
  1191. this.loading = false;
  1192. return;
  1193. }
  1194. if (this.is_noble) {
  1195. if (noble_weight * 1000 > weight * 1000) {
  1196. this.$message.warning("贵金属总重量不能大于商品总重量!");
  1197. this.loading = false;
  1198. return;
  1199. }
  1200. }
  1201. // if (good_type === "1") {
  1202. // let set_num = moq * 1;
  1203. // let isok = true;
  1204. // this.ladder_tableData.forEach((e) => {
  1205. // if (e.min_num * 1 < set_num) {
  1206. // isok = false;
  1207. // }
  1208. // });
  1209. // if (!isok) {
  1210. // this.$message.warning("阶梯成本的起订量不能小于定制起订量!");
  1211. // this.loading = false;
  1212. // return;
  1213. // }
  1214. // }
  1215. let model = JSON.parse(JSON.stringify(this.ruleForm));
  1216. model.cat_id = model.cat_id.toString();
  1217. model.brandid = model.brandid.toString();
  1218. model.supplierNo = model.supplierNo.toString();
  1219. model.delivery_place = model.delivery_place.toString();
  1220. model.origin_place = model.origin_place.toString();
  1221. model.good_info_img = model.good_info_img.toString();
  1222. model.unit = model.unit.toString();
  1223. model.speclist = JSON.parse(JSON.stringify(this.setResData(1)));
  1224. model.good_ladder = JSON.parse(JSON.stringify(this.setResData(2)));
  1225. model.config = model.config.toString();
  1226. model.is_exclusive =
  1227. model.is_exclusive.length > 0
  1228. ? model.is_exclusive[model.is_exclusive.length - 1]
  1229. : "";
  1230. let res = {};
  1231. delete model["id"];
  1232. if (this.type === "add") {
  1233. delete model["spuCode"];
  1234. res = await asyncRequest.add(model);
  1235. } else if (this.type === "editBase") {
  1236. let item1 = this.setModel(model, "1");
  1237. res = await asyncRequest.update(item1);
  1238. } else if (this.type === "editCoin") {
  1239. let item2 = this.setModel(model, "2");
  1240. res = await asyncRequest.updateP(item2);
  1241. } else {
  1242. model.companyNo = model.company_id;
  1243. delete model["company_id"];
  1244. res = await asyncRequest.edit_update(model);
  1245. }
  1246. console.log(res);
  1247. this.loading = false;
  1248. if (res && res.code === 0) {
  1249. const { spuCode } = res.data;
  1250. const title =
  1251. this.type === "add"
  1252. ? "新建成功!"
  1253. : this.type === "editBase"
  1254. ? "基础信息修改成功!"
  1255. : this.type === "editCoin"
  1256. ? "成本信息修改成功!"
  1257. : "商品信息修改成功";
  1258. this.$notify.success({
  1259. title: title,
  1260. message: "",
  1261. });
  1262. this.showModelThis = false;
  1263. // 刷新
  1264. this.$emit("refresh", { spuCode: spuCode });
  1265. }
  1266. } else {
  1267. console.log(valid);
  1268. console.log("error submit!!");
  1269. return false;
  1270. }
  1271. });
  1272. },
  1273. //获取规格值
  1274. setResData(type) {
  1275. let list = JSON.parse(
  1276. JSON.stringify(type === 1 ? this.spec_tableData : this.ladder_tableData)
  1277. );
  1278. let oldlist = JSON.parse(
  1279. JSON.stringify(
  1280. type === 1 ? this.old_spec_tableData : this.old_ladder_tableData
  1281. )
  1282. );
  1283. let hasIDlist = [];
  1284. list.forEach((a) => {
  1285. if (a.id !== "") {
  1286. hasIDlist.push(a);
  1287. }
  1288. });
  1289. let newList = [];
  1290. let resList = [];
  1291. oldlist.forEach((a, ai) => {
  1292. let item = null;
  1293. let index = hasIDlist.findIndex((b) => a.id === b.id);
  1294. if (index === -1) {
  1295. item = JSON.parse(JSON.stringify(a));
  1296. item.is_del = "1";
  1297. } else {
  1298. item = JSON.parse(JSON.stringify(hasIDlist[index]));
  1299. }
  1300. newList.push(item);
  1301. });
  1302. list.forEach((b) => {
  1303. if (b.id === "") {
  1304. b.is_del = "0";
  1305. newList.push(b);
  1306. }
  1307. });
  1308. if (type === 1) {
  1309. newList.forEach((a) => {
  1310. let m = {
  1311. id: a.id,
  1312. spec_id: a.spec_id,
  1313. spec_value_id: a.spec_value_id,
  1314. is_del: a.is_del || "0",
  1315. };
  1316. resList.push(m);
  1317. });
  1318. } else {
  1319. newList.forEach((a) => {
  1320. let m = {
  1321. id: a.id,
  1322. min_num: a.min_num,
  1323. nake_fee: a.nake_fee,
  1324. cost_fee: a.cost_fee,
  1325. delivery_fee: a.delivery_fee,
  1326. is_del: a.is_del || "0",
  1327. };
  1328. resList.push(m);
  1329. });
  1330. }
  1331. return resList;
  1332. },
  1333. setladder() {
  1334. let list = JSON.parse(JSON.stringify(this.ladder_tableData));
  1335. let oldlist = JSON.parse(JSON.stringify(this.old_ladder_tableData));
  1336. let hasIDlist = [];
  1337. list.forEach((a) => {
  1338. if (a.id !== "") {
  1339. hasIDlist.push(a);
  1340. }
  1341. });
  1342. let newList = [];
  1343. let resList = [];
  1344. oldlist.forEach((a, ai) => {
  1345. let item = null;
  1346. let index = hasIDlist.findIndex((b) => a.id === b.id);
  1347. if (index === -1) {
  1348. item = JSON.parse(JSON.stringify(a));
  1349. item.is_del = "1";
  1350. } else {
  1351. item = JSON.parse(JSON.stringify(b));
  1352. }
  1353. newList.push(item);
  1354. });
  1355. list.forEach((b) => {
  1356. if (b.id === "") {
  1357. b.is_del = "0";
  1358. newList.push(b);
  1359. }
  1360. });
  1361. newList.forEach((a) => {
  1362. let m = {
  1363. id: a.id,
  1364. min_num: a.min_num,
  1365. spec_value_id: a.spec_value_id,
  1366. is_del: a.is_del || "0",
  1367. };
  1368. resList.push(m);
  1369. });
  1370. return resList;
  1371. },
  1372. //规格编辑修改
  1373. refreshEdit(e) {
  1374. let item = JSON.parse(JSON.stringify(e));
  1375. const {
  1376. index,
  1377. id,
  1378. spec_id,
  1379. isMust,
  1380. spec_value,
  1381. spec_value_id,
  1382. spec_value_value,
  1383. } = item;
  1384. let ffindex = -1;
  1385. this.spec_tableData.forEach((i, findex) => {
  1386. if (i.spec_id === spec_id) {
  1387. ffindex = findex;
  1388. this.spec_tableData[findex].id = id;
  1389. this.spec_tableData[findex].spec_id = spec_id;
  1390. this.spec_tableData[findex].isMust = isMust;
  1391. this.spec_tableData[findex].spec_value = spec_value;
  1392. this.spec_tableData[findex].spec_value_id = spec_value_id;
  1393. this.spec_tableData[findex].spec_value_value = spec_value_value;
  1394. }
  1395. });
  1396. if (ffindex === -1) {
  1397. this.spec_tableData.push(item);
  1398. }
  1399. this.showModel = false;
  1400. },
  1401. //阶梯成本修改
  1402. costrefreshEdit(e) {
  1403. let item = JSON.parse(JSON.stringify(e));
  1404. const { index, id, cost_fee, delivery_fee, min_num, nake_fee } = item;
  1405. let ffindex = -1;
  1406. this.ladder_tableData.forEach((i, findex) => {
  1407. if (findex === parseInt(index + "")) {
  1408. ffindex = findex;
  1409. this.ladder_tableData[findex].id = id;
  1410. this.ladder_tableData[findex].cost_fee = cost_fee;
  1411. this.ladder_tableData[findex].delivery_fee = delivery_fee;
  1412. this.ladder_tableData[findex].min_num = min_num;
  1413. this.ladder_tableData[findex].nake_fee = nake_fee;
  1414. }
  1415. });
  1416. if (ffindex === -1) {
  1417. this.ladder_tableData.push(item);
  1418. }
  1419. this.showModel = false;
  1420. },
  1421. dataSort(key) {
  1422. return function (a, b) {
  1423. let value1 = a[key];
  1424. let value2 = b[key];
  1425. return value1 - value2;
  1426. };
  1427. },
  1428. resetFormData() {
  1429. this.spec_tableData = [];
  1430. this.old_spec_tableData = [];
  1431. this.ladder_tableData = [];
  1432. this.old_ladder_tableData = [];
  1433. this.cat_id_name = "";
  1434. this.is_noble = false;
  1435. this.status = "";
  1436. this.brand_name = "";
  1437. this.unit_name = "";
  1438. this.supplierName = "";
  1439. this.ruleForm = {
  1440. id: "",
  1441. spuCode: "",
  1442. cat_id: [],
  1443. brandid: [],
  1444. noble_weight: "0",
  1445. weight: "",
  1446. good_type: "0",
  1447. is_stock: "0",
  1448. supplierNo: [],
  1449. company_id: "",
  1450. is_auth: "",
  1451. tax: "",
  1452. good_name: "",
  1453. unit: [],
  1454. is_exclusive: [],
  1455. noble_metal: "",
  1456. is_gold_price: "",
  1457. moq: "0",
  1458. customized: "0",
  1459. after_sales: "",
  1460. craft_desc: "",
  1461. good_remark: "",
  1462. //包装发货/图片
  1463. packing_list: "",
  1464. packing_way: "",
  1465. packing_spec: "",
  1466. packing_weight: "",
  1467. packing_size: "",
  1468. good_size: "",
  1469. good_bar: "",
  1470. supply_area: "",
  1471. delivery_place: [],
  1472. origin_place: [],
  1473. delivery_day: "0",
  1474. lead_time: "0",
  1475. sample_day: "0",
  1476. good_thumb_img: "",
  1477. good_info_img: [],
  1478. //固定阶梯成本
  1479. cert_fee: "0",
  1480. packing_fee: "0",
  1481. cost_fee: "0",
  1482. mark_fee: "0",
  1483. demo_fee: "0",
  1484. open_fee: "0",
  1485. sample_fee: "0",
  1486. market_price: "0",
  1487. nake_price: "0",
  1488. is_step: "",
  1489. is_diff: "",
  1490. config: [],
  1491. other_config: "",
  1492. };
  1493. },
  1494. async resetForm() {
  1495. // 重置
  1496. await this.$nextTick(async () => {
  1497. if (this.$refs.ruleForm) {
  1498. this.$refs.ruleForm.resetFields();
  1499. this.$refs.ruleForm.clearValidate();
  1500. this.spec_tableData = [];
  1501. this.old_spec_tableData = [];
  1502. this.ladder_tableData = [];
  1503. this.old_ladder_tableData = [];
  1504. const {
  1505. id,
  1506. spuCode, //string 商品spuCode
  1507. // good_code, //string 无
  1508. good_name, //string 商品名称
  1509. // cat_id, //string 分类id
  1510. cat_info, //array 分类
  1511. brand_id, //string 品牌id
  1512. unit,
  1513. supplierName,
  1514. companyNo, // string 企业公司id
  1515. good_unit, // string 商品单位
  1516. good_type, //string 是否定制 1是0否
  1517. moq, //string 起订量
  1518. is_exclusive, // string 是否是专属
  1519. customized, // string 定制工期
  1520. tax, //string 税率
  1521. supplierNo, // string 供应商
  1522. is_auth, //string 是否有销售权限0 否1 是
  1523. auth_img, // string 无
  1524. exclusive,
  1525. is_stock, //
  1526. after_sales, // string 售后说明
  1527. craft_desc, // string 工艺说明
  1528. good_remark, // string 商品备注
  1529. weight, // string 重量
  1530. packing_way, // string 包装方式
  1531. packing_size, // string 包装尺寸
  1532. good_size, //商品尺寸
  1533. packing_spec, // string 包装规格
  1534. packing_list, // string 包装清单
  1535. packing_weight, // string 装箱重量
  1536. good_bar, // string 条形码
  1537. supply_area, // string 供货区域 1 全国2 除偏远地区
  1538. delivery_place, // string 发货地区
  1539. origin_place, // string 产地
  1540. delivery_day, // string 物流天数
  1541. lead_time, // string 供货周期
  1542. sample_day, //string 调样周期
  1543. sample_fee, // string 调样费有
  1544. // good_img, // string 商品图片
  1545. good_thumb_img, // string 商品说略图
  1546. good_info_img, // string 商品详情图
  1547. cert_fee, // string 证书费
  1548. packing_fee, // string 打包费
  1549. cost_fee, // string 工艺费
  1550. mark_fee, // string 加标费
  1551. demo_fee, // string 打样费
  1552. open_fee, // string 开模费
  1553. noble_metal, // string 金属类别
  1554. noble_weight, // string 金属重量
  1555. is_gold_price, // string 是否使用实时金价
  1556. market_price, // string 市场价
  1557. nake_price, // string 成本裸价
  1558. is_step, // string 是否使用阶梯价
  1559. // is_online, // string 是否上线
  1560. status, // string 状态
  1561. nakelist, //階梯成本
  1562. speclist, //商品规格
  1563. brand_name,
  1564. config,
  1565. is_diff,
  1566. other_config,
  1567. } = this.sitem;
  1568. let cat_id_name = "";
  1569. let cat_id = [];
  1570. (cat_info || []).forEach((ai, i) => {
  1571. cat_id_name += i === 0 ? ai.name : `_${ai.name}`;
  1572. cat_id.push(ai.id);
  1573. });
  1574. this.cat_id_name = cat_id_name;
  1575. let isok = false;
  1576. if (cat_id.length > 0) {
  1577. cat_id.forEach((i) => {
  1578. if (i === "6") {
  1579. isok = true;
  1580. }
  1581. });
  1582. }
  1583. let exclusiveList = [];
  1584. if (exclusive && exclusive.length > 0) {
  1585. exclusive.forEach((a, ai) => {
  1586. exclusiveList.push(a.id);
  1587. });
  1588. }
  1589. this.is_noble = isok;
  1590. let spec_list1 =
  1591. speclist && speclist.length > 0
  1592. ? JSON.parse(JSON.stringify(speclist))
  1593. : [];
  1594. spec_list1.forEach((a) => {
  1595. let model = {
  1596. id: a.id,
  1597. is_del: a.is_del,
  1598. spec_id: a.spec_id,
  1599. spec_value: a.spec_name,
  1600. spec_value_value: a.spec_value,
  1601. spec_value_id: a.spec_value_id,
  1602. spuCode: a.spuCode,
  1603. };
  1604. this.spec_tableData.push(model);
  1605. });
  1606. this.old_spec_tableData = JSON.parse(
  1607. JSON.stringify(this.spec_tableData)
  1608. );
  1609. let list2 =
  1610. nakelist && nakelist.length > 0
  1611. ? JSON.parse(JSON.stringify(nakelist))
  1612. : [];
  1613. this.ladder_tableData = list2;
  1614. this.old_ladder_tableData = JSON.parse(
  1615. JSON.stringify(this.ladder_tableData)
  1616. );
  1617. this.status = status;
  1618. this.brand_name = brand_name;
  1619. this.unit_name = unit;
  1620. this.supplierName = supplierName || "";
  1621. this.ruleForm = {
  1622. id: id || "",
  1623. spuCode: spuCode || "",
  1624. cat_id:
  1625. cat_id && cat_id.length > 0 ? [cat_id[cat_id.length - 1]] : [],
  1626. brandid: brand_id ? [brand_id] : [],
  1627. noble_weight: noble_weight || "",
  1628. weight: weight || "",
  1629. good_type: good_type || "0",
  1630. is_stock: is_stock || "0",
  1631. supplierNo: supplierNo ? [supplierNo] : [],
  1632. company_id: companyNo || "",
  1633. is_auth: is_auth || "",
  1634. tax: tax ? tax + "%" : "",
  1635. good_name: good_name || "",
  1636. unit: good_unit ? [good_unit] : [],
  1637. is_exclusive: exclusiveList || [],
  1638. noble_metal: noble_metal || "",
  1639. is_gold_price: is_gold_price || "",
  1640. moq: moq || "0",
  1641. customized: customized || "0",
  1642. after_sales: after_sales || "",
  1643. craft_desc: craft_desc || "",
  1644. good_remark: good_remark || "",
  1645. //包装发货/图片
  1646. packing_list: packing_list || "",
  1647. packing_way: packing_way || "",
  1648. packing_spec: packing_spec || "",
  1649. packing_weight: packing_weight || "",
  1650. packing_size: packing_size || "",
  1651. good_size: good_size || "",
  1652. good_bar: good_bar || "",
  1653. supply_area: supply_area || "",
  1654. delivery_place: (delivery_place || "").split(","),
  1655. origin_place: (origin_place || "").split(","),
  1656. delivery_day: delivery_day || "",
  1657. lead_time: lead_time || "",
  1658. sample_day: sample_day || "",
  1659. good_thumb_img: good_thumb_img || "",
  1660. // good_img: "",
  1661. good_info_img: good_info_img
  1662. ? (good_info_img || "").split(",")
  1663. : [],
  1664. //固定阶梯成本
  1665. cert_fee: cert_fee || "",
  1666. packing_fee: packing_fee || "",
  1667. cost_fee: cost_fee || "",
  1668. mark_fee: mark_fee || "",
  1669. demo_fee: demo_fee || "",
  1670. open_fee: open_fee || "",
  1671. sample_fee: sample_fee || "",
  1672. market_price: market_price || "",
  1673. nake_price: nake_price || "",
  1674. is_step: is_step || "",
  1675. is_diff: is_diff || "",
  1676. config: config ? config.split(",") : [],
  1677. other_config: other_config || "",
  1678. };
  1679. }
  1680. await this.set_must_spec();
  1681. });
  1682. },
  1683. sch_is_noble() {
  1684. let list = [
  1685. "noble_weight",
  1686. "noble_metal",
  1687. "is_gold_price",
  1688. "is_diff",
  1689. "config",
  1690. "other_config",
  1691. ];
  1692. for (let i = 0; i < list.length; i++) {
  1693. this.rulesThis[list[i]][0].required = this.is_noble;
  1694. console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
  1695. this.$refs.ruleForm.validateField(list[i]);
  1696. }
  1697. },
  1698. setModel(model, type) {
  1699. let item = null;
  1700. if (type === 1) {
  1701. item = JSON.parse(JSON.stringify(model));
  1702. delete item["cert_fee"];
  1703. delete item["packing_fee"];
  1704. delete item["cost_fee"];
  1705. delete item["mark_fee"];
  1706. delete item["demo_fee"];
  1707. delete item["open_fee"];
  1708. delete item["noble_metal"];
  1709. delete item["noble_weight"];
  1710. delete item["is_gold_price"];
  1711. delete item["market_price"];
  1712. delete item["nake_price"];
  1713. delete item["is_step"];
  1714. delete item["good_ladder"];
  1715. } else {
  1716. const {
  1717. cert_fee,
  1718. packing_fee,
  1719. cost_fee,
  1720. mark_fee,
  1721. demo_fee,
  1722. open_fee,
  1723. noble_metal,
  1724. noble_weight,
  1725. is_gold_price,
  1726. market_price,
  1727. nake_price,
  1728. is_step,
  1729. good_ladder,
  1730. spuCode,
  1731. } = model;
  1732. item = {
  1733. cert_fee: cert_fee || "",
  1734. packing_fee: packing_fee || "",
  1735. cost_fee: cost_fee || "",
  1736. mark_fee: mark_fee || "",
  1737. demo_fee: demo_fee || "",
  1738. open_fee: open_fee || "",
  1739. noble_metal: noble_metal || "",
  1740. noble_weight: noble_weight || "",
  1741. is_gold_price: is_gold_price || "",
  1742. market_price: market_price || "",
  1743. nake_price: nake_price || "",
  1744. is_step: is_step || "",
  1745. good_ladder: good_ladder || [],
  1746. spuCode: spuCode || "",
  1747. };
  1748. }
  1749. return model;
  1750. },
  1751. //商品分类选择
  1752. async goods_class_change(e) {
  1753. const { code, pid, id, label, cat_desc } = e;
  1754. this.ruleForm.cat_id = id ? [id] : [];
  1755. this.$refs.ruleForm.validateField("cat_id");
  1756. this.ruleForm.after_sales = cat_desc || "";
  1757. this.$refs.ruleForm.validateField("after_sales");
  1758. this.is_noble = pid === "6";
  1759. this.sch_is_noble();
  1760. await this.set_must_spec();
  1761. },
  1762. async set_must_spec() {
  1763. const { cat_id } = this.ruleForm;
  1764. let id = cat_id.length == 1 ? cat_id[0] : "";
  1765. let list1 =
  1766. this.spec_tableData && this.spec_tableData.length > 0
  1767. ? JSON.parse(JSON.stringify(this.spec_tableData))
  1768. : [];
  1769. let list2 = [];
  1770. if (id) {
  1771. const { code, message, data } = await asyncRequest.catinfo({ id: id });
  1772. if (code === 0) {
  1773. const { spec } = data;
  1774. if (spec && spec.length > 0) {
  1775. if (list1 && list1.length > 0) {
  1776. list1.forEach((c) => {
  1777. c.isMust = false;
  1778. });
  1779. spec.forEach((a, ai) => {
  1780. let findex = list1.findIndex((b) => b.spec_id === a.id);
  1781. if (findex !== -1) {
  1782. list1[findex].isMust = true;
  1783. } else {
  1784. list1.push({
  1785. id: "",
  1786. index: "1",
  1787. spec_id: a.id,
  1788. spec_value: a.spec_name,
  1789. isMust: true,
  1790. spec_value_value: "",
  1791. spec_value_id: "",
  1792. });
  1793. }
  1794. });
  1795. } else {
  1796. spec.forEach((a, ai) => {
  1797. let model = {
  1798. id: "",
  1799. index: "1",
  1800. spec_id: a.id,
  1801. spec_value: a.spec_name,
  1802. isMust: true,
  1803. spec_value_value: "",
  1804. spec_value_id: "",
  1805. };
  1806. list1.push(model);
  1807. });
  1808. }
  1809. }
  1810. list1.map((e, ei) => {
  1811. e.index = ei + "";
  1812. return e;
  1813. });
  1814. this.spec_tableData =
  1815. list1 && list1.length > 0 ? JSON.parse(JSON.stringify(list1)) : [];
  1816. } else if (code >= 100 && code <= 104) {
  1817. await this.logout();
  1818. } else {
  1819. this.$message.warning(message);
  1820. }
  1821. } else {
  1822. list1.forEach((e) => {
  1823. if (!e.isMust) {
  1824. list2.push(e);
  1825. }
  1826. });
  1827. }
  1828. },
  1829. //商品品牌选择
  1830. brandidsearchChange(e) {
  1831. const { id, code, label } = e;
  1832. if (id) {
  1833. this.ruleForm.brandid = [id];
  1834. } else {
  1835. this.ruleForm.brandid = [];
  1836. }
  1837. this.$refs.ruleForm.validateField("brandid");
  1838. },
  1839. //供应商选择
  1840. supplierNosearchChange(e) {
  1841. console.log(e);
  1842. const { id, code, label } = e;
  1843. if (id) {
  1844. this.ruleForm.supplierNo = [code];
  1845. } else {
  1846. this.ruleForm.supplierNo = [];
  1847. }
  1848. this.$refs.ruleForm.validateField("supplierNo");
  1849. },
  1850. //业务企业选择
  1851. company_idsearchChange(e) {
  1852. const { id, code, label } = e;
  1853. if (id) {
  1854. this.ruleForm.company_id = code;
  1855. } else {
  1856. this.ruleForm.company_id = "";
  1857. }
  1858. this.$refs.ruleForm.validateField("company_id");
  1859. },
  1860. //税点选择
  1861. taxsearchChange(e) {
  1862. this.ruleForm.tax = e;
  1863. this.$refs.ruleForm.validateField("tax");
  1864. },
  1865. //专属类型选择
  1866. exclusiveSearchChange(e) {
  1867. this.ruleForm.is_exclusive = e;
  1868. this.$refs.ruleForm.validateField("is_exclusive");
  1869. },
  1870. //单位选择
  1871. unitsearchChange(e) {
  1872. const { id, code, label } = e;
  1873. if (id) {
  1874. this.ruleForm.unit = [code];
  1875. } else {
  1876. this.ruleForm.unit = [];
  1877. }
  1878. this.$refs.ruleForm.validateField("unit");
  1879. },
  1880. //贵金属种类选择
  1881. noble_metalsearchChange(e) {
  1882. console.log(e);
  1883. const { id, code, label } = e;
  1884. if (id) {
  1885. this.ruleForm.noble_metal = id;
  1886. } else {
  1887. this.ruleForm.noble_metal = "";
  1888. }
  1889. this.$refs.ruleForm.validateField("noble_metal");
  1890. },
  1891. //仓库省市区
  1892. selectAreadelivery_place(e) {
  1893. this.ruleForm.delivery_place = e;
  1894. this.$refs.ruleForm.validateField("delivery_place");
  1895. },
  1896. //仓库省市区
  1897. selectAreaorigin_place(e) {
  1898. this.ruleForm.origin_place = e;
  1899. this.$refs.ruleForm.validateField("origin_place");
  1900. },
  1901. closeImg(index) {
  1902. this.ruleForm.good_info_img.splice(index, 1);
  1903. this.$refs.ruleForm.validateField("good_info_img");
  1904. },
  1905. //图片上传成功
  1906. async UploadSuccessEventgood_thumb_img(data) {
  1907. await this.UploadSuccessEvent(1, data);
  1908. },
  1909. // //图片上传成功
  1910. // async UploadSuccessEventgood_img(data) {
  1911. // await this.UploadSuccessEvent(2, data);
  1912. // },
  1913. //图片上传成功
  1914. async UploadSuccessEventgood_info_img(data) {
  1915. await this.UploadSuccessEvent(3, data);
  1916. },
  1917. //图片上传成功
  1918. async UploadSuccessEvent(type, data) {
  1919. const { url } = data;
  1920. if (url === "noToken") {
  1921. await this.logout();
  1922. } else {
  1923. if (type === 1) {
  1924. this.ruleForm.good_thumb_img = url;
  1925. this.$refs.ruleForm.validateField("good_thumb_img");
  1926. } else if (type === 2) {
  1927. this.ruleForm.good_img = url;
  1928. this.$refs.ruleForm.validateField("good_img");
  1929. } else {
  1930. this.ruleForm.good_info_img.push(url);
  1931. this.$refs.ruleForm.validateField("good_info_img");
  1932. }
  1933. this.$message.success("图片上传成功!");
  1934. }
  1935. },
  1936. good_type_change() {
  1937. let list = ["moq", "customized"];
  1938. for (let i = 0; i < list.length; i++) {
  1939. this.rulesThis[list[i]][0].required = this.ruleForm.good_type === "1";
  1940. console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
  1941. this.$refs.ruleForm.validateField(list[i]);
  1942. }
  1943. },
  1944. //图片上传失败
  1945. UploadErrorEventgood_thumb_img(res) {
  1946. this.imgUploadError(1, res);
  1947. },
  1948. // //图片上传失败
  1949. // UploadErrorEventgood_img(res) {
  1950. // this.imgUploadError(2, res);
  1951. // },
  1952. //图片上传失败
  1953. UploadErrorEventgood_info_img(res) {
  1954. this.imgUploadError(3, res);
  1955. },
  1956. imgUploadError(type, res) {
  1957. if (res !== "break") {
  1958. this.$message.error("图片上传失败!");
  1959. this.$refs.ruleForm.validateField(
  1960. type === 1
  1961. ? "good_thumb_img"
  1962. : type === 2
  1963. ? "good_img"
  1964. : "good_info_img"
  1965. );
  1966. }
  1967. },
  1968. //判断图片规格
  1969. beforeAvatarUpload(file) {
  1970. let isJPG = false;
  1971. if (
  1972. file.type === "image/jpg" ||
  1973. file.type === "image/png" ||
  1974. file.type === "image/jpeg"
  1975. ) {
  1976. isJPG = true;
  1977. }
  1978. const isLt2M = file.size / 1024 / 1024 < 1;
  1979. if (!isJPG) {
  1980. this.$message.error("图片格式不正确!");
  1981. }
  1982. if (!isLt2M) {
  1983. this.$message.error("图片大小不能超过 1MB!");
  1984. }
  1985. return isJPG && isLt2M;
  1986. },
  1987. },
  1988. };
  1989. </script>
  1990. <style lang="scss" scoped>
  1991. .goodsCostDetail {
  1992. // position: relative;
  1993. .good_info_img_div {
  1994. ul {
  1995. width: 100%;
  1996. li {
  1997. float: left;
  1998. width: 89px;
  1999. height: 89px;
  2000. padding: 0 5px 0 0;
  2001. .img-show-li-div {
  2002. width: 84px;
  2003. height: 84px;
  2004. border: 1px solid #dfe4ed;
  2005. background: #dfe4ed;
  2006. position: relative;
  2007. img.img-show {
  2008. width: 100%;
  2009. height: 100%;
  2010. position: relative;
  2011. display: inline-block;
  2012. }
  2013. i.el-icon-close {
  2014. position: absolute;
  2015. z-index: 2;
  2016. top: 0;
  2017. right: 0;
  2018. color: #dfe4ed;
  2019. }
  2020. &:hover {
  2021. i.el-icon-close {
  2022. cursor: pointer;
  2023. color: #63cbe7;
  2024. }
  2025. }
  2026. }
  2027. }
  2028. }
  2029. }
  2030. .goodsCostAdd-title {
  2031. border-top: 1px solid #ebeef5;
  2032. span {
  2033. height: 50px;
  2034. line-height: 50px;
  2035. font-family: "微软雅黑", sans-serif;
  2036. font-weight: 400;
  2037. font-style: normal;
  2038. font-size: 16fpx;
  2039. text-align: left;
  2040. }
  2041. }
  2042. }
  2043. </style>