Purchase.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. <template>
  2. <div style="width: 100%; padding: 0px 15px">
  3. <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
  4. <template #buyer>
  5. <div style="width: 100%">
  6. <el-form-item prop="buyCorporationId">
  7. <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeBuyCorporation">
  8. <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
  9. </el-select>
  10. </el-form-item>
  11. <el-row style="margin-top: 20px; width: 100%">
  12. <el-col :span="8">
  13. <el-form-item label="地址" prop="buyCountryName">
  14. <el-input v-model="formData.data.buyCountryName" placeholder="请输入国家" @change="changeAddress" />
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="8">
  18. <el-form-item label=" " prop="buyProvinceName">
  19. <el-input v-model="formData.data.buyProvinceName" placeholder="请输入省/州" @change="changeAddress" />
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="8">
  23. <el-form-item label=" " prop="buyCityName">
  24. <el-input v-model="formData.data.buyCityName" placeholder="请输入城市" @change="changeAddress" />
  25. </el-form-item>
  26. </el-col>
  27. </el-row>
  28. <el-row style="margin-top: 20px; width: 100%">
  29. <el-col :span="24">
  30. <el-form-item prop="buyAddress">
  31. <el-input v-model="formData.data.buyAddress" type="textarea" @change="changeAddress" />
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. <el-row style="margin-top: 20px; width: 100%">
  36. <el-col :span="8">
  37. <el-form-item label="联系人" prop="buyContactName">
  38. <el-input v-model="formData.data.buyContactName" placeholder="请输入联系人" />
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="16">
  42. <el-form-item label=" " prop="buyContactNumber">
  43. <el-input v-model="formData.data.buyContactNumber" placeholder="请输入联系人电话" />
  44. </el-form-item>
  45. </el-col>
  46. </el-row>
  47. </div>
  48. </template>
  49. <template #seller>
  50. <div style="width: 100%">
  51. <div style="width: 100%">
  52. <el-form-item prop="sellCorporationId">
  53. <el-select v-model="formData.data.sellCorporationId" style="width: 100%" @change="changeSupplier">
  54. <el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value" />
  55. </el-select>
  56. </el-form-item>
  57. <el-row style="margin-top: 20px; width: 100%">
  58. <el-col :span="6">
  59. <el-form-item label="地址" prop="countryId">
  60. <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => changeSellAddress(val, '20')">
  61. <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
  62. </el-select>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="6">
  66. <el-form-item label=" " prop="provinceName">
  67. <selectCity
  68. placeholder="省/洲"
  69. @change="(val) => changeSellAddress(val, '30')"
  70. addressId="provinceId"
  71. addressName="provinceName"
  72. v-model="formData.data"
  73. :data="provinceData">
  74. </selectCity>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :span="6">
  78. <el-form-item label=" " prop="cityName">
  79. <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData" @change="changeAddress">
  80. </selectCity>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="6">
  84. <el-form-item label=" " prop="sellPostalCode">
  85. <el-input v-model="formData.data.sellPostalCode" placeholder="请输入邮编" />
  86. </el-form-item>
  87. </el-col>
  88. </el-row>
  89. <el-row style="margin-top: 20px; width: 100%">
  90. <el-col :span="24">
  91. <el-form-item prop="sellAddress">
  92. <el-input v-model="formData.data.sellAddress" type="textarea" @change="changeAddress" />
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. <el-row style="margin-top: 20px; width: 100%">
  97. <el-col :span="8">
  98. <el-form-item label="联系人" prop="sellContactName">
  99. <el-input v-model="formData.data.sellContactName" placeholder="请输入联系人" />
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="16">
  103. <el-form-item label=" " prop="sellContactNumber">
  104. <el-input v-model="formData.data.sellContactNumber" placeholder="请输入联系人电话" />
  105. </el-form-item>
  106. </el-col>
  107. </el-row>
  108. </div>
  109. </div>
  110. </template>
  111. <template #payment>
  112. <div style="width: 100%">
  113. <el-row style="margin-top: 20px; width: 100%">
  114. <el-col :span="6">
  115. <el-form-item label="付款方式" prop="paymentMethod">
  116. <el-select v-model="formData.data.paymentMethod" placeholder="请选择付款方式" style="width: 100%">
  117. <el-option v-for="item in fundsPaymentMethod" :key="item.value" :label="item.label" :value="item.value" />
  118. </el-select>
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="6">
  122. <el-form-item label="发票类型" prop="invoiceType">
  123. <el-select v-model="formData.data.invoiceType" placeholder="请选择发票类型" style="width: 100%">
  124. <el-option v-for="item in invoiceType" :key="item.value" :label="item.label" :value="item.value" />
  125. </el-select>
  126. </el-form-item>
  127. </el-col>
  128. </el-row>
  129. </div>
  130. </template>
  131. <template #delivery>
  132. <div style="width: 100%">
  133. <el-row style="margin-top: 20px; width: 100%">
  134. <el-col :span="12">
  135. <el-form-item label="交货类型" prop="deliveryType">
  136. <el-radio-group v-model="formData.data.deliveryType" @change="changeAddress">
  137. <el-radio v-for="(item, index) in deliveryType" :key="index" :label="item.value" border>{{ item.label }}</el-radio>
  138. </el-radio-group>
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. <el-row style="margin-top: 20px; width: 100%">
  143. <el-col :span="12">
  144. <el-form-item label="详细地址" prop="address">
  145. <el-input v-model="formData.data.address" :rows="2" type="textarea" placeholder="请输入详细地址" />
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <el-row style="margin-top: 20px; width: 100%">
  150. <el-col :span="6">
  151. <el-form-item label="交付日期" prop="deliveryTime">
  152. <el-date-picker v-model="formData.data.deliveryTime" type="date" placeholder="请选择交付日期" value-format="YYYY-MM-DD" />
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="6">
  156. <el-form-item label="质保期 (天)" prop="warranty">
  157. <el-input-number
  158. onmousewheel="return false;"
  159. v-model="formData.data.warranty"
  160. placeholder="请输入质保期"
  161. style="width: 100%"
  162. :precision="0"
  163. :controls="false"
  164. :min="0" />
  165. </el-form-item>
  166. </el-col>
  167. </el-row>
  168. </div>
  169. </template>
  170. <template #commodity>
  171. <div style="width: 100%" v-if="formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0">
  172. <div
  173. :style="index !== formData.data.purchaseProductList.length - 1 ? 'margin-bottom: 20px' : ''"
  174. v-for="(item, index) in formData.data.purchaseProductList"
  175. :key="item.dataResourceId">
  176. <div style="border: 1px solid #ccc; padding: 20px 10px 0 10px; width: 100%">
  177. <el-row style="width: 100%" :gutter="5" type="flex" align="middle">
  178. <el-col :span="2" style="text-align: center">
  179. <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="onPicture(item.fileUrl)" />
  180. </el-col>
  181. <el-col :span="5">
  182. <span>产品名称: {{ item.productName }}</span>
  183. </el-col>
  184. <el-col :span="4">
  185. <span>尺寸: {{ item.productModel }}</span>
  186. </el-col>
  187. <el-col :span="3">
  188. <span>数量: {{ item.quantity }}</span>
  189. </el-col>
  190. <el-col :span="3">
  191. <span>单价: {{ item.price }}</span>
  192. </el-col>
  193. <el-col :span="2">
  194. <el-button type="primary" text @click="handleHandover(item, index)">编辑备注</el-button>
  195. </el-col>
  196. <el-col :span="2">
  197. <el-button type="primary" text @click="handleMaterial(index)">添加配件</el-button>
  198. </el-col>
  199. <el-col :span="3">
  200. <span>金额小计: {{ item.amount }}</span>
  201. </el-col>
  202. </el-row>
  203. <el-collapse v-model="item.activeName" class="hideCollapse" accordion>
  204. <el-collapse-item title="" :name="true">
  205. <div style="padding: 0 40px">
  206. <el-table :data="item.purchaseProductMountingsList" style="width: 100%">
  207. <el-table-column label="图片" align="center" width="80">
  208. <template #default="{ row }">
  209. <img v-if="row.fileUrl" :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
  210. </template>
  211. </el-table-column>
  212. <el-table-column label="类型" align="center" width="80">
  213. <template #default="{ row }">
  214. <div>{{ dictValueLabel(row.productType, productType) }}</div>
  215. </template>
  216. </el-table-column>
  217. <el-table-column label="产品名称" prop="productName" min-width="180" />
  218. <el-table-column label="尺寸" prop="productModel" min-width="140" />
  219. <el-table-column label="单价" width="140">
  220. <template #default="{ row, $index }">
  221. <div style="width: 100%" class="removePadding">
  222. <el-form-item
  223. :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.price'"
  224. :rules="rules.price"
  225. :inline-message="true"
  226. @change="
  227. () => {
  228. return changeProductMaterial(index, $index);
  229. }
  230. ">
  231. <el-input-number
  232. onmousewheel="return false;"
  233. v-model="row.price"
  234. placeholder="请输入单价"
  235. :precision="2"
  236. :controls="false"
  237. :min="0" />
  238. </el-form-item>
  239. </div>
  240. </template>
  241. </el-table-column>
  242. <el-table-column label="数量" width="140">
  243. <template #default="{ row, $index }">
  244. <div style="width: 100%" class="removePadding">
  245. <el-form-item
  246. :prop="'purchaseProductList.' + index + '.purchaseProductMountingsList.' + $index + '.quantity'"
  247. :rules="rules.quantity"
  248. :inline-message="true"
  249. @change="
  250. () => {
  251. return changeProductMaterial(index, $index);
  252. }
  253. ">
  254. <el-input-number
  255. onmousewheel="return false;"
  256. v-model="row.quantity"
  257. placeholder="请输入数量"
  258. :precision="0"
  259. :controls="false"
  260. :min="0" />
  261. </el-form-item>
  262. </div>
  263. </template>
  264. </el-table-column>
  265. <el-table-column label="金额" prop="amount" width="100" />
  266. <el-table-column label="操作" align="center" width="80" fixed="right">
  267. <template #default="{ $index }">
  268. <el-button type="primary" v-if="$index !== 0" link @click="handleRemove(index, $index)">删除</el-button>
  269. </template>
  270. </el-table-column>
  271. </el-table>
  272. </div>
  273. </el-collapse-item>
  274. </el-collapse>
  275. <div style="text-align: center; margin-top: -18px">
  276. <el-button type="primary" @click="item.activeName = !item.activeName" style="margin-bottom: -28px" text>
  277. <span v-if="item.activeName">
  278. <span style="vertical-align: middle">收起明细</span>
  279. <el-icon style="margin-left: 8px; transform: rotate(-90deg); vertical-align: middle"><DArrowRight /></el-icon>
  280. </span>
  281. <span v-else>
  282. <span style="vertical-align: middle">查看明细</span>
  283. <el-icon style="margin-left: 8px; transform: rotate(90deg); vertical-align: middle"><DArrowRight /></el-icon>
  284. </span>
  285. </el-button>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. </template>
  291. <template #otherCharge>
  292. <div style="width: 100%">
  293. <el-button type="primary" @click="clickAdd()">添加行</el-button>
  294. <el-table :data="formData.data.purchaseProjectList" style="width: 100%; margin-top: 16px">
  295. <el-table-column label="收费项目" width="220">
  296. <template #default="{ row, $index }">
  297. <div style="width: 100%">
  298. <el-form-item :prop="'purchaseProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
  299. <el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
  300. </el-form-item>
  301. </div>
  302. </template>
  303. </el-table-column>
  304. <el-table-column label="备注">
  305. <template #default="{ row, $index }">
  306. <div style="width: 100%">
  307. <el-form-item :prop="'purchaseProjectList.' + $index + '.remark'">
  308. <el-input v-model="row.remark" placeholder="请输入备注" />
  309. </el-form-item>
  310. </div>
  311. </template>
  312. </el-table-column>
  313. <el-table-column label="金额" width="130">
  314. <template #default="{ row, $index }">
  315. <div style="width: 100%">
  316. <el-form-item
  317. :prop="'purchaseProjectList.' + $index + '.amount'"
  318. :rules="rules.amount"
  319. :inline-message="true"
  320. class="shrinkPadding"
  321. @change="changeProject">
  322. <el-input-number
  323. onmousewheel="return false;"
  324. v-model="row.amount"
  325. placeholder="请输入金额"
  326. style="width: 100%"
  327. :precision="2"
  328. :controls="false"
  329. :min="0" />
  330. </el-form-item>
  331. </div>
  332. </template>
  333. </el-table-column>
  334. <el-table-column label="操作" width="60" align="center" fixed="right">
  335. <template #default="{ $index }">
  336. <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
  337. </template>
  338. </el-table-column>
  339. </el-table>
  340. </div>
  341. </template>
  342. <template #offerMoney>
  343. <div style="width: 100%; display: flex">
  344. <div style="width: calc(100% - 190px)"></div>
  345. <div style="width: 130px; padding: 0 12px">
  346. <el-form-item label="合同总金额" prop="amount" class="shrinkPadding">
  347. <el-input v-model="formData.data.amount" placeholder="合同总金额" disabled />
  348. </el-form-item>
  349. </div>
  350. </div>
  351. </template>
  352. <template #contractClause>
  353. <div style="width: 100%">
  354. <el-row style="margin-top: 20px; width: 100%">
  355. <el-col :span="8">
  356. <el-form-item label="合同模板" prop="contractTemplateId">
  357. <el-select v-model="formData.data.contractTemplateId" style="width: 100%" @change="changeContractTemplate">
  358. <el-option v-for="item in templateList" :key="item.value" :label="item.label" :value="item.value" />
  359. </el-select>
  360. </el-form-item>
  361. </el-col>
  362. </el-row>
  363. <div style="margin-top: 20px; width: 100%">
  364. <el-form-item label="条款内容" prop="remark">
  365. <div v-if="judgeStatus()">
  366. <div v-html="getStyle(formData.data.remark)"></div>
  367. </div>
  368. <Editor v-else style="width: 100%" :value="formData.data.remark" @updateValue="updateContent" ref="remarkEditor" />
  369. </el-form-item>
  370. </div>
  371. </div>
  372. </template>
  373. <template #shipment>
  374. <div style="width: 100%">
  375. <el-table :data="formData.data.purchaseArrivalList" style="width: 100%; margin-top: 16px">
  376. <el-table-column prop="code" label="商品编码" width="120" />
  377. <el-table-column prop="productName" label="商品名称" />
  378. <el-table-column label="到货日期" width="220">
  379. <template #default="{ row, $index }">
  380. <div style="width: 100%">
  381. <el-form-item :prop="'purchaseArrivalList.' + $index + '.arrivalTime'" :rules="rules.arrivalTime" :inline-message="true">
  382. <el-date-picker v-model="row.arrivalTime" type="date" placeholder="请选择到货日期" value-format="YYYY-MM-DD" />
  383. </el-form-item>
  384. </div>
  385. </template>
  386. </el-table-column>
  387. <el-table-column label="到货数量" width="160">
  388. <template #default="{ row, $index }">
  389. <div style="width: 100%">
  390. <el-form-item :prop="'purchaseArrivalList.' + $index + '.quantity'" :inline-message="true">
  391. <el-input-number
  392. onmousewheel="return false;"
  393. v-model="row.quantity"
  394. placeholder="请输入到货数量"
  395. style="width: 100%"
  396. :precision="0"
  397. :controls="false"
  398. :min="0" />
  399. </el-form-item>
  400. </div>
  401. </template>
  402. </el-table-column>
  403. <el-table-column align="center" label="操作" width="120" fixed="right">
  404. <template #default="{ row, $index }">
  405. <el-button type="primary" link @click="clickSplit(row)">拆分</el-button>
  406. <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
  407. </template>
  408. </el-table-column>
  409. </el-table>
  410. </div>
  411. </template>
  412. </byForm>
  413. <el-dialog v-if="openMaterialCompany" v-model="openMaterialCompany" title="公司产品库" width="90%" append-to-body>
  414. <ProductMaterial :selectStatus="true" @selectMaterial="selectMaterial"></ProductMaterial>
  415. </el-dialog>
  416. <el-dialog title="备注" v-if="openHandover" v-model="openHandover" width="800">
  417. <byForm :formConfig="formHandoverConfig" :formOption="formOption" v-model="productRow.data">
  418. <template #file>
  419. <div style="width: 100%">
  420. <el-upload
  421. v-model:fileList="fileList"
  422. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  423. :data="uploadData"
  424. multiple
  425. :before-upload="uploadFile"
  426. :on-success="handleSuccess"
  427. :on-preview="onPreviewFile">
  428. <el-button>选择</el-button>
  429. </el-upload>
  430. </div>
  431. </template>
  432. <template #remark>
  433. <div style="width: 100%">
  434. <Editor :value="productRow.data.remark" @updateValue="updateHandover" />
  435. </div>
  436. </template>
  437. </byForm>
  438. <template #footer>
  439. <el-button @click="openHandover = false" size="large">取 消</el-button>
  440. <el-button type="primary" @click="submitHandoverForm()" size="large">确 定</el-button>
  441. </template>
  442. </el-dialog>
  443. </div>
  444. </template>
  445. <script setup>
  446. import byForm from "@/components/byForm/index";
  447. import ProductMaterial from "@/views/product/material/index";
  448. import { ElMessage } from "element-plus";
  449. import selectCity from "@/components/selectCity/index.vue";
  450. import Editor from "@/components/Editor/index.vue";
  451. import { useRoute } from "vue-router";
  452. const route = useRoute();
  453. const { proxy } = getCurrentInstance();
  454. const invoiceType = ref([]);
  455. const fundsPaymentMethod = ref([]);
  456. const templateList = ref([]);
  457. const corporationList = ref([]);
  458. const supplierList = ref([]);
  459. const countryData = ref([]);
  460. const provinceData = ref([]);
  461. const cityData = ref([]);
  462. const openMaterialCompany = ref(false);
  463. const formData = reactive({
  464. data: {
  465. deliveryType: 1,
  466. remark: "",
  467. amount: undefined,
  468. purchaseArrivalList: [],
  469. purchaseProductList: [],
  470. purchaseProjectList: [],
  471. },
  472. });
  473. const submit = ref(null);
  474. const deliveryType = ref([
  475. {
  476. label: "买方地址",
  477. value: 1,
  478. },
  479. {
  480. label: "工厂交付",
  481. value: 2,
  482. },
  483. {
  484. label: "其他",
  485. value: 3,
  486. },
  487. ]);
  488. const productType = ref([
  489. {
  490. label: "产品",
  491. value: 1,
  492. },
  493. {
  494. label: "物料",
  495. value: 2,
  496. },
  497. ]);
  498. const judgeStatus = () => {
  499. if (props.queryData.recordList && props.queryData.recordList.length > 0) {
  500. let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
  501. if (data && data.length > 0) {
  502. return true;
  503. }
  504. }
  505. return false;
  506. };
  507. const formOption = reactive({
  508. inline: true,
  509. labelWidth: 100,
  510. itemWidth: 100,
  511. rules: [],
  512. disabled: false,
  513. });
  514. const formConfig = computed(() => {
  515. return [
  516. {
  517. type: "slot",
  518. slotName: "buyer",
  519. label: "买方信息",
  520. itemWidth: 50,
  521. },
  522. {
  523. type: "slot",
  524. slotName: "seller",
  525. label: "卖方信息",
  526. itemWidth: 50,
  527. },
  528. {
  529. type: "slot",
  530. slotName: "payment",
  531. label: "付款信息",
  532. },
  533. {
  534. type: "slot",
  535. slotName: "delivery",
  536. label: "交付信息",
  537. },
  538. {
  539. type: "slot",
  540. slotName: "commodity",
  541. label: "采购明细",
  542. },
  543. {
  544. type: "slot",
  545. slotName: "otherCharge",
  546. label: "其他收费项目",
  547. },
  548. {
  549. type: "slot",
  550. slotName: "offerMoney",
  551. },
  552. {
  553. type: "slot",
  554. slotName: "contractClause",
  555. label: "合同条款",
  556. },
  557. {
  558. type: "slot",
  559. slotName: "shipment",
  560. label: "到货要求",
  561. },
  562. ];
  563. });
  564. const rules = ref({
  565. buyCorporationId: [{ required: true, message: "请选择买方公司", trigger: "change" }],
  566. sellCorporationId: [{ required: true, message: "请选择卖方公司", trigger: "change" }],
  567. countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
  568. sellAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
  569. buyAddress: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
  570. sellContactName: [{ required: true, message: "请输入联系人", trigger: "blur" }],
  571. sellContactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
  572. quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
  573. price: [{ required: true, message: "请输入单价", trigger: "blur" }],
  574. amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
  575. payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
  576. warranty: [{ required: true, message: "请输入质保期", trigger: "blur" }],
  577. deliveryType: [{ required: true, message: "请选择交货类型", trigger: "change" }],
  578. address: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
  579. deliveryTime: [{ required: true, message: "请选择交付日期", trigger: "change" }],
  580. paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
  581. invoiceType: [{ required: true, message: "请选择付款方式", trigger: "change" }],
  582. contractTemplateId: [{ required: true, message: "请选择合同模板", trigger: "change" }],
  583. remark: [{ required: true, message: "请输入条款内容", trigger: "change" }],
  584. });
  585. const getDict = () => {
  586. proxy.getDictOne(["invoice_type", "funds_payment_method"]).then((res) => {
  587. invoiceType.value = res["invoice_type"].map((x) => ({
  588. label: x.dictValue,
  589. value: x.dictKey,
  590. }));
  591. fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
  592. label: x.dictValue,
  593. value: x.dictKey,
  594. }));
  595. });
  596. proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  597. templateList.value = res.rows.map((item) => {
  598. return {
  599. ...item,
  600. label: item.templateName,
  601. value: item.id,
  602. };
  603. });
  604. });
  605. proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  606. corporationList.value = res.rows.map((item) => {
  607. return {
  608. ...item,
  609. label: item.name,
  610. value: item.id,
  611. };
  612. });
  613. });
  614. proxy.post("/supplierInfo/page", { pageNum: 1, pageSize: 999 }).then((res) => {
  615. supplierList.value = res.rows.map((item) => {
  616. return {
  617. ...item,
  618. label: item.name,
  619. value: item.id,
  620. };
  621. });
  622. });
  623. };
  624. getDict();
  625. const getCityData = (id, type, isChange) => {
  626. return proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
  627. if (type === "20") {
  628. provinceData.value = res;
  629. if (isChange) {
  630. formData.data.provinceId = "";
  631. formData.data.provinceName = "";
  632. formData.data.cityId = "";
  633. formData.data.cityName = "";
  634. }
  635. } else if (type === "30") {
  636. cityData.value = res;
  637. if (isChange) {
  638. formData.data.cityId = "";
  639. formData.data.cityName = "";
  640. }
  641. } else {
  642. countryData.value = res;
  643. }
  644. });
  645. };
  646. getCityData("0");
  647. const changeBuyCorporation = (val) => {
  648. formData.data.buyCountryName = "";
  649. formData.data.buyProvinceName = "";
  650. formData.data.buyCityName = "";
  651. formData.data.buyAddress = "";
  652. if (val) {
  653. proxy.post("/corporation/detail", { id: val }).then((res) => {
  654. formData.data.buyAddress = res.address;
  655. Promise.all([getBuyCountryName(res.countryId), getBuyProvinceName(res.provinceId, res.countryId), getBuyCityName(res.cityId, res.provinceId)]).then(
  656. () => {
  657. changeAddress();
  658. }
  659. );
  660. });
  661. }
  662. };
  663. const changeAddress = () => {
  664. if (formData.data.deliveryType === 1) {
  665. let buyCountryName = "";
  666. if (formData.data.buyCountryName) {
  667. buyCountryName = formData.data.buyCountryName;
  668. }
  669. let buyProvinceName = "";
  670. if (formData.data.buyProvinceName) {
  671. buyProvinceName = formData.data.buyProvinceName;
  672. }
  673. let buyCityName = "";
  674. if (formData.data.buyCityName) {
  675. buyCityName = formData.data.buyCityName;
  676. }
  677. let buyAddress = "";
  678. if (formData.data.buyAddress) {
  679. buyAddress = formData.data.buyAddress;
  680. }
  681. formData.data.address = buyCountryName + ", " + buyProvinceName + ", " + buyCityName + "," + buyAddress;
  682. } else if (formData.data.deliveryType === 2) {
  683. let countryName = "";
  684. if (formData.data.countryId) {
  685. let data = countryData.value.filter((item) => item.id === formData.data.countryId);
  686. if (data && data.length > 0) countryName = data[0].chineseName;
  687. }
  688. let provinceName = "";
  689. if (formData.data.provinceId) {
  690. let data = provinceData.value.filter((item) => item.id === formData.data.provinceId);
  691. if (data && data.length > 0) provinceName = data[0].name;
  692. } else {
  693. if (formData.data.provinceName) {
  694. provinceName = formData.data.provinceName;
  695. }
  696. }
  697. let cityName = "";
  698. if (formData.data.cityId) {
  699. let data = cityData.value.filter((item) => item.id === formData.data.cityId);
  700. if (data && data.length > 0) cityName = data[0].name;
  701. } else {
  702. if (formData.data.cityName) {
  703. cityName = formData.data.cityName;
  704. }
  705. }
  706. let sellAddress = "";
  707. if (formData.data.sellAddress) {
  708. sellAddress = formData.data.sellAddress;
  709. }
  710. formData.data.address = countryName + ", " + provinceName + ", " + cityName + "," + sellAddress;
  711. }
  712. };
  713. const changeSellAddress = (val, index) => {
  714. Promise.all([getCityData(val, index, true)]).then(() => {
  715. changeAddress();
  716. });
  717. };
  718. const getBuyCountryName = (val) => {
  719. return proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
  720. let buyCountryData = resCountry.filter((item) => item.id === val);
  721. if (buyCountryData && buyCountryData.length > 0) {
  722. formData.data.buyCountryName = buyCountryData[0].chineseName;
  723. } else {
  724. formData.data.buyCountryName = "";
  725. }
  726. });
  727. };
  728. const getBuyProvinceName = (val, countryId) => {
  729. if (val) {
  730. return proxy.post("/customizeArea/list", { parentId: countryId }).then((resProvince) => {
  731. let buyProvinceData = resProvince.filter((item) => item.id === val);
  732. if (buyProvinceData && buyProvinceData.length > 0) {
  733. formData.data.buyProvinceName = buyProvinceData[0].name;
  734. } else {
  735. formData.data.buyProvinceName = "";
  736. }
  737. });
  738. } else {
  739. formData.data.buyProvinceName = "";
  740. return;
  741. }
  742. };
  743. const getBuyCityName = (val, provinceId) => {
  744. if (val) {
  745. return proxy.post("/customizeArea/list", { parentId: provinceId }).then((resCity) => {
  746. let buyCityData = resCity.filter((item) => item.id === val);
  747. if (buyCityData && buyCityData.length > 0) {
  748. formData.data.buyCityName = buyCityData[0].name;
  749. } else {
  750. formData.data.buyCityName = "";
  751. }
  752. });
  753. } else {
  754. formData.data.buyCityName = "";
  755. return;
  756. }
  757. };
  758. const changeSupplier = (val) => {
  759. formData.data.countryId = "";
  760. formData.data.provinceId = "";
  761. formData.data.cityId = "";
  762. formData.data.sellPostalCode = "";
  763. formData.data.sellAddress = "";
  764. formData.data.sellContactName = "";
  765. formData.data.sellContactNumber = "";
  766. if (val) {
  767. let data = supplierList.value.filter((item) => item.id === val);
  768. if (data && data.length > 0) {
  769. formData.data.countryId = data[0].countryId;
  770. formData.data.provinceId = data[0].provinceId;
  771. formData.data.cityId = data[0].cityId;
  772. formData.data.sellAddress = data[0].areaDetail;
  773. formData.data.sellContactName = data[0].contactPerson;
  774. formData.data.sellContactNumber = data[0].contactNumber;
  775. if (formData.data.provinceId) {
  776. Promise.all([getCityData(formData.data.countryId, "20"), getCityData(formData.data.provinceId, "30")]).then(() => {
  777. changeAddress();
  778. });
  779. } else {
  780. Promise.all([getCityData(formData.data.countryId, "20")]).then(() => {
  781. changeAddress();
  782. });
  783. }
  784. }
  785. }
  786. };
  787. const onPicture = (path) => {
  788. window.open(path, "_blank");
  789. };
  790. const changeProject = () => {
  791. nextTick(() => {
  792. calculationAllAmount();
  793. });
  794. };
  795. const calculationAllAmount = () => {
  796. let amount = 0;
  797. if (formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0) {
  798. for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
  799. if (formData.data.purchaseProductList[i].amount) {
  800. amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[i].amount)).toFixed(2));
  801. }
  802. }
  803. }
  804. if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
  805. for (let i = 0; i < formData.data.purchaseProjectList.length; i++) {
  806. if (formData.data.purchaseProjectList[i].amount) {
  807. amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProjectList[i].amount)).toFixed(2));
  808. }
  809. }
  810. }
  811. formData.data.amount = amount;
  812. };
  813. const calculationProductAmount = (index) => {
  814. if (
  815. formData.data.purchaseProductList &&
  816. formData.data.purchaseProductList.length > 0 &&
  817. formData.data.purchaseProductList[index].purchaseProductMountingsList &&
  818. formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
  819. ) {
  820. let amount = 0;
  821. for (let i = 0; i < formData.data.purchaseProductList[index].purchaseProductMountingsList.length; i++) {
  822. if (formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount) {
  823. amount = Number(parseFloat(Number(amount) + Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[i].amount)).toFixed(2));
  824. }
  825. }
  826. formData.data.purchaseProductList[index].amount = amount;
  827. let price = 0;
  828. if (formData.data.purchaseProductList[index].quantity && amount) {
  829. price = Number(parseFloat(Number(amount) / Number(formData.data.purchaseProductList[index].quantity)).toFixed(4));
  830. }
  831. formData.data.purchaseProductList[index].price = price;
  832. }
  833. nextTick(() => {
  834. calculationAllAmount();
  835. });
  836. };
  837. const changeProductMaterial = (index, indexTwo) => {
  838. nextTick(() => {
  839. if (
  840. formData.data.purchaseProductList &&
  841. formData.data.purchaseProductList.length > 0 &&
  842. formData.data.purchaseProductList[index].purchaseProductMountingsList &&
  843. formData.data.purchaseProductList[index].purchaseProductMountingsList.length > 0
  844. ) {
  845. if (indexTwo === 0 && formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) {
  846. formData.data.purchaseProductList[index].quantity = formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity;
  847. }
  848. if (
  849. formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity &&
  850. formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price
  851. ) {
  852. formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = Number(
  853. parseFloat(
  854. Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].quantity) *
  855. Number(formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].price)
  856. ).toFixed(2)
  857. );
  858. } else {
  859. formData.data.purchaseProductList[index].purchaseProductMountingsList[indexTwo].amount = 0;
  860. }
  861. }
  862. nextTick(() => {
  863. calculationProductAmount(index);
  864. });
  865. });
  866. };
  867. const handleRemove = async (index, indexTwo) => {
  868. await formData.data.purchaseProductList[index].purchaseProductMountingsList.splice(indexTwo, 1);
  869. nextTick(() => {
  870. calculationProductAmount(index);
  871. });
  872. };
  873. const clickAdd = () => {
  874. if (formData.data.purchaseProjectList && formData.data.purchaseProjectList.length > 0) {
  875. formData.data.purchaseProjectList.push({
  876. payName: "",
  877. amount: undefined,
  878. remark: "",
  879. });
  880. } else {
  881. formData.data.purchaseProjectList = [{ payName: "", amount: undefined, remark: "" }];
  882. }
  883. };
  884. const handleDelete = async (index) => {
  885. await formData.data.purchaseProjectList.splice(index, 1);
  886. nextTick(() => {
  887. calculationAllAmount();
  888. });
  889. };
  890. const querySearch = (queryString, callback) => {
  891. proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
  892. if (res.rows && res.rows.length > 0) {
  893. res.rows = res.rows.map((item) => {
  894. return {
  895. ...item,
  896. value: item.payName,
  897. };
  898. });
  899. callback(res.rows);
  900. } else {
  901. callback([]);
  902. }
  903. });
  904. };
  905. const handleSubmit = async () => {
  906. let status = await submit.value.handleSubmit(() => {});
  907. if (status) {
  908. if (formData.data.purchaseArrivalList && formData.data.purchaseArrivalList.length > 0) {
  909. for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
  910. let data = formData.data.purchaseArrivalList.filter((item) => item.productId === formData.data.purchaseProductList[i].productId);
  911. if (data && data.length > 0) {
  912. let quantity = 0;
  913. for (let j = 0; j < data.length; j++) {
  914. quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
  915. }
  916. if (quantity > formData.data.purchaseProductList[i].quantity) {
  917. ElMessage("到货数量不能大于采购数量");
  918. return false;
  919. }
  920. }
  921. }
  922. }
  923. return true;
  924. } else {
  925. setTimeout(() => {
  926. const errorDiv = document.getElementsByClassName("is-error");
  927. errorDiv[0].scrollIntoView();
  928. }, 0);
  929. }
  930. return status;
  931. };
  932. // 接收父组件的传值
  933. const props = defineProps({
  934. queryData: Object,
  935. });
  936. watch(
  937. props.queryData,
  938. () => {
  939. formOption.disabled = judgeStatus();
  940. if (props.queryData && (route.query.processType == 10 || route.query.processType == 20)) {
  941. for (var text in props.queryData) {
  942. formData.data[text] = props.queryData[text];
  943. }
  944. if (formData.data.countryId) {
  945. getCityData(formData.data.countryId, "20");
  946. }
  947. if (formData.data.provinceId) {
  948. getCityData(formData.data.provinceId, "30");
  949. }
  950. }
  951. },
  952. {
  953. deep: true,
  954. }
  955. );
  956. const getFormData = () => {
  957. return formData.data;
  958. };
  959. // 向父组件暴露
  960. defineExpose({
  961. getFormData,
  962. handleSubmit,
  963. });
  964. onMounted(() => {
  965. if (props.queryData.ids) {
  966. proxy.post("/delivery/page", { ids: props.queryData.ids }).then((res) => {
  967. if (res.rows && res.rows.length > 0) {
  968. formData.data.purchaseProductList = res.rows.map((item) => {
  969. return {
  970. productId: item.productId,
  971. contractId: item.contractId,
  972. productName: item.productName,
  973. productModel: item.productModel,
  974. quantity: item.expendQuantity,
  975. price: "",
  976. amount: "",
  977. remark: "",
  978. json: "",
  979. fileUrl: "",
  980. dataResource: props.queryData.type,
  981. dataResourceId: item.id,
  982. purchaseProductMountingsList: [
  983. {
  984. productId: item.productId,
  985. productType: 1,
  986. productName: item.productName,
  987. productModel: item.productModel,
  988. quantity: item.expendQuantity,
  989. price: undefined,
  990. amount: "",
  991. remark: "",
  992. json: "",
  993. fileUrl: "",
  994. activeName: false,
  995. },
  996. ],
  997. fileList: [],
  998. };
  999. });
  1000. formData.data.purchaseArrivalList = res.rows.map((item) => {
  1001. return {
  1002. code: item.productCode,
  1003. productId: item.productId,
  1004. productName: item.productName,
  1005. arrivalTime: "",
  1006. quantity: undefined,
  1007. };
  1008. });
  1009. let fileIds = formData.data.purchaseProductList.map((item) => item.productId);
  1010. proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
  1011. for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
  1012. if (resFile[formData.data.purchaseProductList[i].productId] && resFile[formData.data.purchaseProductList[i].productId].length > 0) {
  1013. formData.data.purchaseProductList[i].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
  1014. formData.data.purchaseProductList[i].purchaseProductMountingsList[0].fileUrl = resFile[formData.data.purchaseProductList[i].productId][0].fileUrl;
  1015. }
  1016. }
  1017. });
  1018. } else {
  1019. formData.data.purchaseProductList = [];
  1020. }
  1021. });
  1022. }
  1023. });
  1024. const clickSplit = (item) => {
  1025. formData.data.purchaseArrivalList.push({
  1026. code: item.code,
  1027. productId: item.productId,
  1028. productName: item.productName,
  1029. arrivalTime: "",
  1030. remark: "",
  1031. quantity: undefined,
  1032. });
  1033. };
  1034. const clickDelete = (index) => {
  1035. formData.data.purchaseArrivalList.splice(index, 1);
  1036. };
  1037. const updateContent = (val) => {
  1038. formData.data.remark = val;
  1039. };
  1040. const remarkEditor = ref(null);
  1041. const changeContractTemplate = (val) => {
  1042. if (val) {
  1043. proxy.post("/contractTemplate/detail", { id: val }).then((res) => {
  1044. remarkEditor.value.changeHtml(res.templateContent);
  1045. });
  1046. }
  1047. };
  1048. const productRow = reactive({
  1049. data: {
  1050. productName: "",
  1051. remark: "",
  1052. },
  1053. });
  1054. const productIndex = ref(0);
  1055. const openHandover = ref(false);
  1056. const fileList = ref([]);
  1057. const uploadData = ref({});
  1058. const formHandoverConfig = computed(() => {
  1059. return [
  1060. {
  1061. type: "title",
  1062. title: "产品信息",
  1063. label: "",
  1064. },
  1065. {
  1066. type: "input",
  1067. prop: "productName",
  1068. label: "产品名称",
  1069. itemType: "text",
  1070. disabled: true,
  1071. },
  1072. {
  1073. type: "input",
  1074. prop: "productModel",
  1075. label: "规格型号",
  1076. itemType: "text",
  1077. disabled: true,
  1078. },
  1079. {
  1080. type: "slot",
  1081. prop: "file",
  1082. slotName: "file",
  1083. label: "上传附件",
  1084. },
  1085. {
  1086. type: "slot",
  1087. slotName: "remark",
  1088. label: "备注",
  1089. },
  1090. ];
  1091. });
  1092. const handleHandover = (row, index) => {
  1093. productRow.data = {
  1094. productName: row.productName,
  1095. remark: row.remark,
  1096. };
  1097. if (row.fileList && row.fileList.length > 0) {
  1098. fileList.value = row.fileList.map((item) => {
  1099. return {
  1100. raw: item,
  1101. name: item.fileName,
  1102. url: item.fileUrl,
  1103. };
  1104. });
  1105. } else {
  1106. fileList.value = [];
  1107. }
  1108. productIndex.value = index;
  1109. openHandover.value = true;
  1110. };
  1111. const handleMaterial = (index) => {
  1112. productIndex.value = index;
  1113. openMaterialCompany.value = true;
  1114. };
  1115. const uploadFile = async (file) => {
  1116. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  1117. uploadData.value = res.uploadBody;
  1118. file.id = res.id;
  1119. file.fileName = res.fileName;
  1120. file.fileUrl = res.fileUrl;
  1121. file.uploadState = true;
  1122. return true;
  1123. };
  1124. const handleSuccess = (any, UploadFile) => {
  1125. UploadFile.raw.uploadState = false;
  1126. };
  1127. const onPreviewFile = (file) => {
  1128. window.open(file.raw.fileUrl, "_blank");
  1129. };
  1130. const updateHandover = (val) => {
  1131. productRow.data.remark = val;
  1132. };
  1133. const submitHandoverForm = () => {
  1134. if (fileList.value && fileList.value.length > 0) {
  1135. for (let i = 0; i < fileList.value.length; i++) {
  1136. if (fileList.value[i].raw.uploadState) {
  1137. ElMessage("文件上传中,请稍后提交");
  1138. return;
  1139. }
  1140. }
  1141. formData.data.purchaseProductList[productIndex.value].fileList = fileList.value.map((item) => {
  1142. return {
  1143. id: item.raw.id,
  1144. fileName: item.raw.fileName,
  1145. fileUrl: item.raw.fileUrl,
  1146. uploadState: item.raw.uploadState,
  1147. };
  1148. });
  1149. } else {
  1150. formData.data.purchaseProductList[productIndex.value].fileList = [];
  1151. }
  1152. formData.data.purchaseProductList[productIndex.value].remark = productRow.data.remark;
  1153. openHandover.value = false;
  1154. };
  1155. const selectMaterial = (goods) => {
  1156. if (goods && goods.id) {
  1157. let data = formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.filter((item) => item.productId === goods.id);
  1158. if (data && data.length > 0) {
  1159. return ElMessage("该物料已添加");
  1160. }
  1161. let fileUrl = "";
  1162. if (goods.fileList && goods.fileList.length > 0) {
  1163. fileUrl = goods.fileList[0].fileUrl;
  1164. }
  1165. formData.data.purchaseProductList[productIndex.value].purchaseProductMountingsList.push({
  1166. productId: goods.id,
  1167. productType: 2,
  1168. productName: goods.name,
  1169. productModel: goods.spec,
  1170. quantity: undefined,
  1171. price: undefined,
  1172. amount: "",
  1173. remark: "",
  1174. json: "",
  1175. fileUrl: fileUrl,
  1176. activeName: false,
  1177. });
  1178. ElMessage({
  1179. message: "添加成功!",
  1180. type: "success",
  1181. });
  1182. } else {
  1183. return ElMessage("选择错误");
  1184. }
  1185. };
  1186. const getStyle = (text) => {
  1187. if (text) {
  1188. return text.replace(/\n|\r\n/g, "<br>");
  1189. } else {
  1190. return "";
  1191. }
  1192. };
  1193. </script>
  1194. <style lang="scss" scoped>
  1195. ::v-deep(.el-input-number .el-input__inner) {
  1196. text-align: left;
  1197. }
  1198. .pic {
  1199. object-fit: contain;
  1200. width: 50px;
  1201. height: 50px;
  1202. cursor: pointer;
  1203. vertical-align: middle;
  1204. }
  1205. .shrinkPadding {
  1206. padding-right: 0 !important;
  1207. }
  1208. .hideCollapse {
  1209. margin-top: -28px;
  1210. border: 0 !important;
  1211. }
  1212. ::v-deep(.el-collapse-item__arrow) {
  1213. display: none !important;
  1214. }
  1215. ::v-deep(.el-collapse-item__wrap) {
  1216. border: 0 !important;
  1217. }
  1218. ::v-deep(.el-collapse-item__header) {
  1219. border: 0 !important;
  1220. }
  1221. ::v-deep(.el-collapse-item__content) {
  1222. padding-bottom: 8px !important;
  1223. }
  1224. .pic {
  1225. object-fit: contain;
  1226. width: 50px;
  1227. height: 50px;
  1228. cursor: pointer;
  1229. vertical-align: middle;
  1230. }
  1231. ::v-deep(.removePadding) {
  1232. .el-form-item {
  1233. padding-right: 0 !important;
  1234. }
  1235. }
  1236. </style>