editForm.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403
  1. <template>
  2. <el-form
  3. ref="ruleForm"
  4. :loading="loading"
  5. :model="ruleForm"
  6. status-icon
  7. :size="'mini'"
  8. :rules="rulesThis"
  9. label-width="86px"
  10. style="width: 100%"
  11. class="demo-ruleForm"
  12. >
  13. <el-row>
  14. <el-col :span="6">
  15. <el-form-item label="竞价类型" prop="is_project">
  16. <el-select
  17. v-model="ruleForm.is_project"
  18. style="width: 100%"
  19. placeholder="竞价类型"
  20. clearable
  21. :disabled="type === 'view' || type === 'edit' || type === 'copy-edit'"
  22. >
  23. <el-option
  24. v-for="item in options"
  25. :key="item.value"
  26. :label="item.label"
  27. :value="item.value"
  28. >
  29. </el-option>
  30. </el-select>
  31. </el-form-item>
  32. </el-col>
  33. <!-- <el-col :span="6">-->
  34. <!-- <el-form-item label="支付渠道" prop="pay_id">-->
  35. <!-- <search-pay-->
  36. <!-- :value="ruleForm.pay_id"-->
  37. <!-- :disabled="type === 'view' || ruleForm.is_project === '1'"-->
  38. <!-- :size="'mini'"-->
  39. <!-- :is_show="'1'"-->
  40. <!-- :isDetail="type === 'view' || ruleForm.is_project === '1'"-->
  41. <!-- :names="pay_name"-->
  42. <!-- :placeholder="'支付渠道'"-->
  43. <!-- @searchChange="pay_id_change"-->
  44. <!-- />-->
  45. <!-- </el-form-item>-->
  46. <!-- </el-col>-->
  47. <el-col :span="6">
  48. <el-form-item label="竞价截止时间" label-width="110px" prop="endtime">
  49. <el-date-picker
  50. v-model="ruleForm.endtime"
  51. type="datetime"
  52. value-format="yyyy-MM-dd HH:mm:ss"
  53. style="width: 100%"
  54. :disabled="type === 'view'"
  55. :picker-options="pickerOptions"
  56. placeholder="竞价截止时间"
  57. >
  58. </el-date-picker>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="12">
  62. <el-form-item label="所属平台" prop="platform_code">
  63. <search-terrace
  64. :value="ruleForm.platform_code"
  65. :disabled="type === 'view' || type === 'edit'"
  66. :size="'mini'"
  67. :is_show="'1'"
  68. :isDetail="type === 'view' || type === 'edit'"
  69. :names="platform_name"
  70. :placeholder="'所属平台'"
  71. @searchChange="platform_code_codesearchChange"
  72. />
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="12">
  76. <el-form-item label="销售方" prop="companyNo">
  77. <search-work-company
  78. :value="ruleForm.companyNo"
  79. :placeholder="'销售方公司'"
  80. :disabled="type === 'view' || type === 'edit' || type === 'copy-edit'"
  81. :size="'mini'"
  82. :isDetail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  83. @searchChange="company_idsearchChange"
  84. />
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="12">
  88. <el-form-item label="购买方" prop="khNo">
  89. <search-customer
  90. :value="ruleForm.khNo"
  91. :names="ruleForm.khname"
  92. :placeholder="'购买方公司'"
  93. :size="'mini'"
  94. @searchChange="customerChange"
  95. :disabled="type === 'view' || type === 'edit'"
  96. :is-detail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  97. />
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="24">
  101. <el-form-item label="收货区域" prop="area">
  102. <search-area
  103. :value="areaCode"
  104. :is-detail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  105. :disabled="type === 'view' || type === 'edit'"
  106. :size="'mini'"
  107. :detail-select="true"
  108. :level="2"
  109. :names="areaLabel"
  110. :placeholder="'收货区域'"
  111. @searchChange="areasearchChange"
  112. />
  113. </el-form-item>
  114. </el-col>
  115. <el-col :span="24" v-show="ruleForm.is_project === '1'">
  116. <el-form-item label="项目信息" prop="projectNo" class="clear">
  117. <show-data-table
  118. :newTime="fnewTime"
  119. v-if="
  120. fnewTime !== '' &&
  121. projectSitem &&
  122. projectSitem.projectNo &&
  123. ruleForm.projectNo !== ''
  124. "
  125. :sitem="projectSitem"
  126. border
  127. :columns="projectColumns"
  128. />
  129. <div class="hasHover" v-else @click="showProjectModel = true">
  130. <el-alert
  131. center
  132. show-icon
  133. title="点击此处选择项目"
  134. type="warning"
  135. :closable="false"
  136. />
  137. </div>
  138. </el-form-item>
  139. <el-form-item label="项目商品要求" required>
  140. <el-table
  141. :data="ptableData"
  142. :size="'mini'"
  143. border
  144. stripe
  145. tooltip-effect="dark"
  146. style="width: 100%"
  147. >
  148. <el-table-column prop="good_type" label="商品类型" width="80px">
  149. <template slot-scope="scope">
  150. <el-tag
  151. :size="'mini'"
  152. v-text="
  153. (
  154. statusOptions.find((item) => item.value == scope.row.good_type) ||
  155. {}
  156. ).label || '--'
  157. "
  158. ></el-tag
  159. ></template>
  160. </el-table-column>
  161. <el-table-column prop="budget_price" label="预算单价" width="110" />
  162. <el-table-column prop="num" label="购买数量" width="110" />
  163. <el-table-column prop="cat_name" label="商品分类" />
  164. <el-table-column prop="good_img" label="图片" width="70">
  165. <template slot-scope="scope">
  166. <div
  167. v-if="scope.row.good_img"
  168. style="width: 20px; height: 20px"
  169. class="hover"
  170. v-viewer
  171. >
  172. <img
  173. :src="scope.row.good_img"
  174. style="display: inline-block; width: 100%; height: 100%"
  175. alt=""
  176. />
  177. </div>
  178. </template>
  179. </el-table-column>
  180. <el-table-column prop="good_name" label="商品名称" />
  181. </el-table>
  182. </el-form-item>
  183. </el-col>
  184. <el-col :span="24">
  185. <el-row>
  186. <el-col :span="8">
  187. <el-form-item label="到货日期" prop="arrival_time">
  188. <el-date-picker
  189. v-model="ruleForm.arrival_time"
  190. type="date"
  191. style="width: 100%"
  192. :disabled="
  193. type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
  194. "
  195. value-format="yyyy-MM-dd"
  196. :picker-options="pickerOptions1"
  197. placeholder="到货日期"
  198. >
  199. </el-date-picker>
  200. </el-form-item>
  201. </el-col>
  202. <el-col :span="6">
  203. <el-form-item label="是否多地" prop="is_addrs">
  204. <el-select
  205. v-model="ruleForm.is_addrs"
  206. placeholder="是否多地"
  207. :disabled="type === 'view'"
  208. style="width: 100%"
  209. >
  210. <el-option
  211. v-for="item in is_addrs_options"
  212. :key="item.value"
  213. :label="item.label"
  214. :value="item.value"
  215. >
  216. </el-option>
  217. </el-select>
  218. </el-form-item>
  219. </el-col>
  220. <el-col :span="6" style="margin-bottom:1px">
  221. <el-form-item label="预算单价" prop="budget_price">
  222. <digital-input
  223. :values="ruleForm.budget_price"
  224. :placeholder="'预算单价'"
  225. :min="0"
  226. :max="100000000000"
  227. :position="'right'"
  228. :precision="2"
  229. :size="'mini'"
  230. :disabled="
  231. type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
  232. "
  233. :controls="false"
  234. :append="'元'"
  235. @reschange="digitalInput($event, 'budget_price')"
  236. />
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="4" style="margin-bottom:1px">
  240. <el-form-item label="数量" prop="num" label-width="60px">
  241. <digital-input
  242. :values="ruleForm.num"
  243. :placeholder="'数量'"
  244. :min="0"
  245. :max="100000000000"
  246. :position="'right'"
  247. :precision="0"
  248. :size="'mini'"
  249. :disabled="
  250. type === 'view' || (type === 'edit' && ruleForm.is_project === '1')
  251. "
  252. :controls="false"
  253. :append="''"
  254. @reschange="digitalInput($event, 'num')"
  255. />
  256. </el-form-item>
  257. </el-col>
  258. <el-col :span="8">
  259. <el-form-item label="品牌" prop="brand_id">
  260. <search-brand
  261. :value="ruleForm.brand_id"
  262. :size="'mini'"
  263. :isDetail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  264. :names="brand_name"
  265. :disabled="type === 'view' || type === 'edit'"
  266. :placeholder="'品牌'"
  267. @searchChange="brand_id_searchChange"
  268. />
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="6">
  272. <el-form-item label="是否定制" prop="is_custom">
  273. <el-select
  274. v-model="ruleForm.is_custom"
  275. placeholder="是否定制"
  276. :disabled="type === 'view'"
  277. style="width: 100%"
  278. >
  279. <el-option
  280. v-for="item in is_custom_options"
  281. :key="item.value"
  282. :label="item.label"
  283. :value="item.value"
  284. >
  285. </el-option>
  286. </el-select>
  287. </el-form-item>
  288. </el-col>
  289. <el-col :span="6">
  290. <el-form-item label="重量" prop="total_weight">
  291. <digital-input
  292. :values="ruleForm.total_weight"
  293. :placeholder="'重量'"
  294. :min="0"
  295. :max="100000000000"
  296. :position="'right'"
  297. :precision="3"
  298. :controls="false"
  299. :size="'mini'"
  300. :append="'g'"
  301. :disabled="type === 'view'"
  302. @reschange="digitalInput($event, 'total_weight')"
  303. />
  304. </el-form-item>
  305. </el-col>
  306. <el-col :span="4">
  307. <el-form-item label="单位" prop="unit" label-width="60px">
  308. <search-unit
  309. :value="ruleForm.unit"
  310. :disabled="type === 'view'"
  311. :size="'mini'"
  312. :isDetail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  313. :names="unit_name"
  314. :placeholder="'商品单位'"
  315. @searchChange="unitsearchChange"
  316. />
  317. </el-form-item>
  318. </el-col>
  319. <el-col :span="12">
  320. <el-form-item label="商品分类" prop="cat_id">
  321. <search-sort
  322. :value="ruleForm.cat_id"
  323. :placeholder="'商品分类'"
  324. :disabled="type === 'view' || type === 'edit'"
  325. :size="'mini'"
  326. :names="cat_id_name"
  327. :isDetail="type === 'view' || type === 'edit' || type === 'copy-edit'"
  328. @searchChange="goods_class_change"
  329. />
  330. </el-form-item>
  331. </el-col>
  332. <el-col :span="12">
  333. <el-form-item label="商品名称" prop="good_name">
  334. <el-input
  335. v-model="ruleForm.good_name"
  336. :disabled="type === 'view'"
  337. placeholder="商品名称"
  338. maxlength="100"
  339. />
  340. </el-form-item>
  341. </el-col>
  342. <el-col :span="12">
  343. <el-form-item label="工艺说明" prop="cost_desc">
  344. <el-input
  345. v-model="ruleForm.cost_desc"
  346. :disabled="type === 'view'"
  347. placeholder="工艺说明"
  348. maxlength="500"
  349. />
  350. </el-form-item>
  351. <el-form-item label="产品用途" prop="use_desc">
  352. <el-input
  353. v-model="ruleForm.use_desc"
  354. :disabled="type === 'view'"
  355. placeholder="产品用途"
  356. maxlength="500"
  357. />
  358. </el-form-item>
  359. <el-form-item label="商品备注" prop="remark">
  360. <el-input
  361. v-model="ruleForm.remark"
  362. :disabled="type === 'view'"
  363. placeholder="商品备注"
  364. maxlength="500"
  365. />
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="12" style="padding: 0 0 0 15px">
  369. <el-table
  370. :data="spec_tableData"
  371. :size="'mini'"
  372. border
  373. style="width: 100%"
  374. height="120px"
  375. >
  376. <el-table-column prop="spec_name" label="规格类型" />
  377. <el-table-column prop="spec_value_name" label="规格值" />
  378. <el-table-column fixed="right" width="88px" v-if="type !== 'view'">
  379. <template slot="header" slot-scope="scope">
  380. <span>操作</span>
  381. <el-tooltip
  382. class="item"
  383. effect="dark"
  384. content="添加规格类型"
  385. placement="top"
  386. >
  387. <i
  388. class="el-icon-circle-plus-outline fr"
  389. style="font-size: 18px; margin-top: 2px"
  390. @click="openEdit('-1', {})"
  391. />
  392. </el-tooltip>
  393. </template>
  394. <template slot-scope="scope">
  395. <el-tooltip effect="dark" content="修改" placement="top">
  396. <i
  397. class="el-icon-edit tb-icon"
  398. @click="openEdit(scope.$index, scope.row)"
  399. ></i>
  400. </el-tooltip>
  401. <el-tooltip
  402. effect="dark"
  403. v-if="!scope.row.isMust"
  404. content="删除"
  405. placement="top"
  406. >
  407. <i
  408. class="el-icon-delete tb-icon"
  409. @click="openDelete(scope.$index)"
  410. ></i>
  411. </el-tooltip>
  412. </template>
  413. </el-table-column>
  414. </el-table>
  415. <!-- 弹窗 新增/修改 -->
  416. <base-form-add-edit
  417. :index="modelIndex"
  418. :show-model="showOtherModel"
  419. :sitem="modelSitem"
  420. @refresh="refreshEdit"
  421. @cancel="showOtherModel = false"
  422. />
  423. </el-col>
  424. <el-col :span="24">
  425. <el-row>
  426. <el-col :span="12" v-show="is_noble">
  427. <el-form-item label="配置要求" prop="config">
  428. <el-select
  429. v-model="ruleForm.config"
  430. multiple
  431. :disabled="type === 'view'"
  432. style="width: 100%"
  433. placeholder="配置要求"
  434. >
  435. <el-option
  436. v-for="(item, index) in config_options"
  437. :key="item + index"
  438. :label="item"
  439. :value="item"
  440. >
  441. </el-option>
  442. </el-select>
  443. </el-form-item>
  444. </el-col>
  445. <el-col :span="6" v-show="is_noble">
  446. <el-form-item label="金属克重" prop="specs_weight">
  447. <digital-input
  448. :values="ruleForm.specs_weight"
  449. :placeholder="'金属克重'"
  450. :min="0"
  451. :max="100000000000"
  452. :position="'right'"
  453. :precision="3"
  454. :controls="false"
  455. :size="'mini'"
  456. :disabled="type === 'view'"
  457. :append="'g'"
  458. @reschange="digitalInput($event, 'specs_weight')"
  459. />
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="6" v-show="is_noble">
  463. <el-form-item label="启用金价" prop="is_gold_price">
  464. <el-select
  465. v-model="ruleForm.is_gold_price"
  466. placeholder="启用金价"
  467. :disabled="type === 'view'"
  468. style="width: 100%"
  469. >
  470. <el-option
  471. v-for="item in is_gold_price_options"
  472. :key="item.value"
  473. :label="item.label"
  474. :value="item.value"
  475. >
  476. </el-option>
  477. </el-select>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="24" style="text-align: right">
  481. <el-row>
  482. <el-col :span="8">
  483. <el-form-item
  484. label="商品图片"
  485. prop="good_img"
  486. :disabled="id == '007'"
  487. >
  488. <div class="activity-upload clear">
  489. <div class="btnupload">
  490. <img
  491. v-if="ruleForm.good_img"
  492. :src="ruleForm.good_img"
  493. class="avatar"
  494. />
  495. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  496. <file-upload
  497. class="Upload"
  498. :disabled="
  499. type === 'view' || (type !== 'view' && ruleForm.p_good_img)
  500. "
  501. :accept="'.jpg,.png,.jpeg'"
  502. :multiple="true"
  503. :uploadcondition="beforeAvatarUpload"
  504. @UploadErrorEvent="UploadErrorEvent"
  505. @UploadSuccessEvent="UploadSuccessEvent"
  506. ></file-upload>
  507. </div>
  508. <div class="txt-tips fl">
  509. <p>小于1Mb</p>
  510. </div>
  511. </div>
  512. </el-form-item>
  513. </el-col>
  514. <el-col :span="8" class="clear">
  515. <el-form-item
  516. label="附件"
  517. prop="enclosure_file"
  518. class="activity-upload"
  519. >
  520. <div v-if="ruleForm && ruleForm.enclosure_file" class="clearfix tl">
  521. <a :href="ruleForm.enclosure_file" download="附件" class="fl"
  522. >点击下载</a
  523. >
  524. <el-link
  525. :underline="false"
  526. v-if="type !== 'view'"
  527. @click="deleteUrl()"
  528. type="warning"
  529. style="margin: 0 0 0 16px"
  530. class="fr"
  531. >删除</el-link
  532. >
  533. </div>
  534. <div class="activity-upload" v-else>
  535. <div class="btnupload" style="position: relative">
  536. <i class="el-icon-plus avatar-uploader-icon"></i>
  537. <file-upload-pdf
  538. class="Upload"
  539. :accept="'.zip,.rar,.7z,.doc,.docx,.xlsx,.xls,.pdf'"
  540. :multiple="false"
  541. :uploadcondition="beforeOtherUpload"
  542. @UploadErrorEvent="UploadErrorOtherenclosure_file"
  543. @UploadSuccessEvent="UploadSuccessOtherenclosure_file"
  544. />
  545. </div>
  546. <div class="txt-tips fl">
  547. <p>建议大小:小于5MB</p>
  548. <p>文件格式:.zip,.rar,.7z</p>
  549. <p>.doc,.docx,.xlsx,.xls,.pdf</p>
  550. </div>
  551. </div>
  552. </el-form-item>
  553. </el-col>
  554. <el-col :span="8" v-show="is_noble">
  555. <el-form-item label="金属种类" prop="metal_id">
  556. <search-metal-kind
  557. :value="ruleForm.metal_id"
  558. :size="'mini'"
  559. :disabled="type === 'view'"
  560. :isDetail="type !== 'add'"
  561. :placeholder="'贵金属种类'"
  562. @searchChange="noble_metalsearchChange"
  563. />
  564. </el-form-item>
  565. <el-form-item
  566. v-if="ruleForm.is_gold_price === '1'"
  567. label="当前金价"
  568. style="margin: 0 0 0 0"
  569. >
  570. <el-input
  571. v-model="ruleForm.gold_price"
  572. disabled
  573. placeholder="当前金价"
  574. maxlength="500"
  575. >
  576. <template slot="append">元</template></el-input
  577. >
  578. </el-form-item>
  579. </el-col>
  580. <el-col :span="16" v-show="is_noble">
  581. <el-form-item
  582. label="其他配置要求"
  583. prop="other_config"
  584. label-width="120px"
  585. >
  586. <el-input
  587. v-model="ruleForm.other_config"
  588. :disabled="type === 'view'"
  589. type="textarea"
  590. :rows="2"
  591. placeholder="其他配置要求"
  592. maxlength="250"
  593. show-word-limit
  594. />
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="8" class="fr tr">
  598. <div class="lsac">
  599. 竞价单总额:
  600. {{
  601. priceAccMul(
  602. ruleForm && ruleForm.budget_price ? ruleForm.budget_price : "0",
  603. ruleForm && ruleForm.num ? ruleForm.num : "0"
  604. )
  605. }}
  606. (元)
  607. </div>
  608. <el-button
  609. v-if="type !== 'view'"
  610. type="primary"
  611. :size="'mini'"
  612. @click="submitForm"
  613. >保 存
  614. </el-button>
  615. </el-col>
  616. </el-row>
  617. </el-col>
  618. </el-row>
  619. </el-col>
  620. </el-row>
  621. </el-col>
  622. </el-row>
  623. </el-form>
  624. </template>
  625. <script>
  626. import asyncRequest from "@/apis/service/sellOut/zixunOrder";
  627. import resToken from "@/mixins/resToken";
  628. import { edutRules } from "../columns";
  629. import baseFormAddEdit from "./baseFormAddEdit";
  630. import { mapGetters } from "vuex";
  631. import { accMul } from "@/utils/validate";
  632. import { projectColumns } from "./ShowDataTableColumns";
  633. import companyHelper from '@/mixins/companyHelper'
  634. export default {
  635. name: "handover",
  636. props: ["id", "sitem", "newTime", "type"],
  637. mixins: [resToken, companyHelper],
  638. computed: {
  639. ...mapGetters(["business_companyNo"]),
  640. },
  641. components: {
  642. baseFormAddEdit,
  643. },
  644. data() {
  645. return {
  646. areaCode:[],
  647. areaLabel:[],
  648. od_form: null,
  649. projectColumns,
  650. companyName:'',
  651. projectSitem: null,
  652. fnewTime: "",
  653. unit_name: "",
  654. modelIndex: "",
  655. modelSitem: {},
  656. brand_name: "",
  657. showOtherModel: false,
  658. platform_name: "",
  659. cat_id_name: "",
  660. is_noble: false,
  661. multipleSelection: [],
  662. pay_name: "",
  663. is_addrs_options: [
  664. { value: "0", label: "一地" },
  665. { value: "1", label: "多地" },
  666. ],
  667. is_custom_options: [
  668. { value: "0", label: "非定制" },
  669. { value: "1", label: "定制" },
  670. ],
  671. is_gold_price_options: [
  672. { value: "0", label: "不启用" },
  673. { value: "1", label: "启用" },
  674. ],
  675. config_options: ["证书", "包装盒", "绒布袋", "标签", "其他"],
  676. ptableData: [],
  677. showModel: false,
  678. editItem: {},
  679. spec_tableData: [],
  680. options: [
  681. { value: "0", label: "非项目" },
  682. { value: "1", label: "项目" },
  683. ],
  684. statusOptions: [
  685. { value: "1", label: "竞品" },
  686. { value: "2", label: "竞聘" },
  687. ],
  688. configOptions: ["证书", "包装盒", "绒布袋", "标签", "其他"],
  689. poptions: [],
  690. loading: false,
  691. selectLoading: false,
  692. pickerOptions: {
  693. disabledDate(time) {
  694. return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
  695. },
  696. },
  697. pickerOptions1: {
  698. disabledDate(time) {
  699. return time.getTime() <= Date.now();
  700. },
  701. },
  702. status: "", //存储详情接口返的状态
  703. ruleForm: {
  704. is_project: "0", //竞价类型 1非项目2项目,
  705. projectNo: "", //项目编号
  706. khNo: [], //客户编号
  707. khname: "", //客户名称
  708. companyNo: "",
  709. endtime: "", //竞价截止时间
  710. pendtime: "", //项目竞价截止时间
  711. platform_code: "", //平台id
  712. pay_id: "0",
  713. puse_desc: "",
  714. budget_total: "",
  715. arrtime: "",
  716. p_cat_info: [],
  717. p_cat_id: "",
  718. p_budget_price: "",
  719. p_pgNo: "",
  720. p_num: "",
  721. p_good_type: "",
  722. p_good_name: "",
  723. p_good_img: "",
  724. pgNo: "",
  725. arrival_time: "",
  726. budget_price: "0.00",
  727. num: "0",
  728. brand_id: [],
  729. cat_id: [],
  730. unit: [],
  731. good_img: "",
  732. good_name: "",
  733. total_weight: "0",
  734. is_addrs: "",
  735. is_custom: "",
  736. is_gold_price: "",
  737. config: [],
  738. specs_weight: "0.000",
  739. other_config: "",
  740. cost_desc: "",
  741. use_desc: "",
  742. remark: "",
  743. metal_id: "",
  744. gold_price: "",
  745. area:""
  746. },
  747. rulesThis: this.rules,
  748. // 验证规则
  749. rules: edutRules,
  750. };
  751. },
  752. computed: {
  753. powers() {
  754. const tran =
  755. this.$store.getters.btnList.find(
  756. (item) => item.menu_route == "zixunOrderDetail"
  757. ) || {};
  758. const { action } = tran ?? {};
  759. return action ?? [];
  760. },
  761. },
  762. mounted() {
  763. this.initForm();
  764. },
  765. watch: {
  766. id: function (val) {
  767. if (val) {
  768. this.initForm();
  769. }
  770. },
  771. newTime: function (val) {
  772. if (val) {
  773. this.initForm();
  774. }
  775. },
  776. },
  777. methods: {
  778. priceAccMul(a, b) {
  779. return accMul(a, b);
  780. },
  781. async initForm() {
  782. this.loading = true;
  783. this.status = "";
  784. this.spec_tableData = [];
  785. this.platform_name = "";
  786. this.rulesThis = this.rules;
  787. this.disabled = false;
  788. await this.resetForm();
  789. this.sch_is_noble();
  790. this.getNewTime();
  791. this.loading = false;
  792. },
  793. handleSelectionChange(val) {
  794. this.multipleSelection = val;
  795. },
  796. async digitalInput(e, key) {
  797. this.ruleForm[key] = e + "" || "0";
  798. this.$refs.ruleForm.validateField(key);
  799. },
  800. areasearchChange(e) {
  801. const { id, label } = e
  802. this.areaCode = e && id ? [id] : []
  803. this.ruleForm.area = label
  804. this.$refs.ruleForm.validateField('area')
  805. },
  806. sch_is_noble() {
  807. this.rulesThis["projectNo"][0].required = this.ruleForm.is_project === "1";
  808. this.$refs.ruleForm.validateField("projectNo");
  809. let list = [
  810. "config",
  811. "specs_weight",
  812. "is_gold_price",
  813. "metal_id",
  814. "other_config",
  815. "gold_price",
  816. ];
  817. for (let i = 0; i < list.length; i++) {
  818. if (this.rulesThis[list[i]]) {
  819. this.rulesThis[list[i]][0].required = this.is_noble;
  820. // console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
  821. this.$refs.ruleForm.validateField(list[i]);
  822. }
  823. }
  824. },
  825. async resetForm() {
  826. this.resign_name = "";
  827. this.hand_name = "";
  828. this.status = "";
  829. // { value: "0", label: "非项目" },
  830. // { value: "1", label: "项目" },
  831. // 重置
  832. await this.$nextTick(async () => {
  833. if (this.$refs.ruleForm) {
  834. this.$refs.ruleForm.resetFields();
  835. this.$refs.ruleForm.clearValidate();
  836. let {
  837. is_project, //竞价类型 1销售2竞价,
  838. projectNo, //项目编号
  839. khNo, //客户编号
  840. khname, //客户名称
  841. companyNo,
  842. endtime, //竞价截止时间
  843. platform_code, //平台id
  844. platform_name,
  845. pay_id,
  846. pay_name,
  847. ladder,
  848. pgNo,
  849. can,
  850. arrival_time,
  851. budget_price,
  852. num,
  853. brand_id,
  854. brand,
  855. cat_id,
  856. good_img,
  857. good_name,
  858. total_weight,
  859. is_addrs,
  860. is_custom,
  861. is_gold_price,
  862. config,
  863. specs_weight,
  864. other_config,
  865. cost_desc,
  866. use_desc,
  867. remark,
  868. metal_id,
  869. gold_price,
  870. unit,
  871. unit_name,
  872. p_cat_info,
  873. p_cat_id,
  874. p_budget_price,
  875. p_pgNo,
  876. p_num,
  877. p_good_type,
  878. p_good_name,
  879. p_good_img,
  880. p_arrtime,
  881. specinfo,
  882. enclosure_file,
  883. area
  884. } = JSON.parse(JSON.stringify(this.sitem));
  885. this.unit_name = unit_name;
  886. this.brand_name = brand;
  887. this.spec_tableData =
  888. specinfo && specinfo.length > 0 ? JSON.parse(JSON.stringify(specinfo)) : [];
  889. this.cat_id_name = "";
  890. //非项目 projectNo不必填
  891. if(this.sitem.is_project === '0'){
  892. this.$set(this.rulesThis.projectNo, '0', {
  893. required: false,
  894. message: '请选择项目',
  895. trigger: 'change'
  896. })
  897. }
  898. if (can && can.length > 0) {
  899. can.forEach((s, i) => {
  900. if (i === 0 && s.id === "6") {
  901. this.is_noble = true;
  902. }
  903. this.cat_id_name += i === 0 ? s.name : `_${s.name}`;
  904. });
  905. }
  906. // console.log(pgNo);
  907. let fi = "-1";
  908. this.platform_name = platform_name || "";
  909. this.ruleForm = {
  910. infoNo: this.id,
  911. is_project: is_project || "0", //竞价类型 1销售2竞价,
  912. projectNo: projectNo || "", //项目编号
  913. khNo: khNo ? [khNo] : [], //客户编号
  914. khname: khname ? [khname] : [], //客户名称
  915. companyNo: companyNo || this.business_companyNo || "",
  916. endtime: endtime || "", //竞价截止时间
  917. platform_code: platform_code || "", //平台id
  918. pay_id: pay_id || "0",
  919. puse_desc: "",
  920. budget_total: "",
  921. arrtime: "",
  922. p_cat_info: p_cat_info,
  923. p_cat_id: p_cat_id,
  924. p_budget_price: p_budget_price,
  925. p_pgNo: p_pgNo,
  926. p_num: p_num,
  927. p_good_type: p_good_type,
  928. p_good_name: p_good_name,
  929. p_good_img: p_good_img,
  930. p_arrtime: p_arrtime,
  931. pgNo: pgNo || "",
  932. arrival_time: arrival_time || "",
  933. budget_price: budget_price || "0.00",
  934. num: num || "0",
  935. brand_id: brand_id ? [brand_id] : [],
  936. cat_id: cat_id && cat_id.length > 0 ? [cat_id[cat_id.length - 1]] : [],
  937. good_img: good_img || "",
  938. good_name: good_name || "",
  939. total_weight: total_weight || "0",
  940. is_addrs: is_addrs || "0",
  941. is_custom: is_custom || "0",
  942. is_gold_price: is_gold_price || "0",
  943. config: config ? config.split(",") : [],
  944. specs_weight: specs_weight || "0.000",
  945. other_config: other_config || "",
  946. cost_desc: cost_desc || "",
  947. use_desc: use_desc || "",
  948. remark: remark || "",
  949. metal_id: metal_id || "",
  950. gold_price: gold_price || "",
  951. unit: unit ? [unit] : [],
  952. enclosure_file: enclosure_file || "",
  953. area
  954. };
  955. this.areaLabel = area ? [area] : []
  956. // console.log(this.ruleForm)
  957. this.pay_name = pay_id + "" == "0" ? "不选择" : pay_name;
  958. if (this.ruleForm.projectNo) {
  959. await this.projectChange([{ projectNo: this.ruleForm.projectNo }]);
  960. }
  961. this.od_form = JSON.parse(JSON.stringify(this.ruleForm));
  962. await this.set_must_spec();
  963. }
  964. });
  965. },
  966. //项目选择
  967. async projectChange(e) {
  968. const key = e && e.length > 0 ? e[0].projectNo : "";
  969. if (key) {
  970. const { code, data, message } = await asyncRequest.pdetail({
  971. projectNo: key,
  972. });
  973. if (code === 0) {
  974. const {
  975. khNo,
  976. khName,
  977. pay_id,
  978. pay_name,
  979. platform_id,
  980. platform_name,
  981. ladder,
  982. companyNo,
  983. company,
  984. } = data;
  985. this.companyName = company
  986. this.ruleForm.projectNo = key;
  987. this.projectSitem = JSON.parse(JSON.stringify(data));
  988. //平台赋值
  989. this.platform_code_codesearchChange({
  990. id: platform_id,
  991. code: platform_id,
  992. label: platform_name,
  993. });
  994. //支付渠道赋值
  995. this.pay_id_change({
  996. id: pay_id,
  997. code: pay_id,
  998. label: pay_id + "" == "0" ? "不选择" : pay_name,
  999. });
  1000. //销售方公司赋值
  1001. this.company_idsearchChange({
  1002. id: companyNo,
  1003. code: companyNo,
  1004. label: company,
  1005. });
  1006. //购买方公司赋值
  1007. this.customerChange({
  1008. id: khNo,
  1009. code: khNo,
  1010. label: khName,
  1011. });
  1012. this.ptableData = ladder;
  1013. this.ptableData.forEach((e) => {
  1014. e.cat_name = "";
  1015. const { cat_info } = e;
  1016. if (cat_info && cat_info.length > 0) {
  1017. cat_info.forEach((b, bi) => {
  1018. e.cat_name += bi !== 0 ? "/" + b.name : b.name;
  1019. });
  1020. }
  1021. });
  1022. this.tableData = [];
  1023. } else if (code >= 100 && code <= 104) {
  1024. await this.logout();
  1025. } else {
  1026. this.$message.warning(message);
  1027. this.ptableData = [];
  1028. this.ruleForm.use_desc = "";
  1029. this.ruleForm.budget_total = "";
  1030. this.ruleForm.arrtime = "";
  1031. this.tableData = [];
  1032. }
  1033. }
  1034. },
  1035. openEdit(index, sitem) {
  1036. this.modelIndex = index;
  1037. this.modelSitem = sitem;
  1038. this.showOtherModel = true;
  1039. },
  1040. openDelete(index) {
  1041. this.spec_tableData.splice(index, 1);
  1042. },
  1043. async set_must_spec() {
  1044. const { cat_id } = this.ruleForm;
  1045. let id = cat_id.length == 1 ? cat_id[0] : "";
  1046. if (id) {
  1047. const { code, message, data } = await asyncRequest.catinfo({ id: id });
  1048. if (code === 0) {
  1049. const { spec } = data;
  1050. if (spec && spec.length > 0) {
  1051. if (this.spec_tableData && this.spec_tableData.length > 0) {
  1052. this.spec_tableData.forEach((c) => {
  1053. c.isMust = false;
  1054. });
  1055. spec.forEach((a, ai) => {
  1056. let findex = this.spec_tableData.findIndex((b) => b.specid === a.id);
  1057. if (findex !== -1) {
  1058. this.spec_tableData[findex].isMust = true;
  1059. } else {
  1060. this.spec_tableData.push({
  1061. id: "",
  1062. index: "1",
  1063. specid: a.id,
  1064. spec_name: a.spec_name,
  1065. isMust: true,
  1066. spec_value_name: "",
  1067. spec_value_id: "",
  1068. });
  1069. }
  1070. });
  1071. } else {
  1072. spec.forEach((a, ai) => {
  1073. let model = {
  1074. id: "",
  1075. index: "1",
  1076. specid: a.id,
  1077. spec_name: a.spec_name,
  1078. isMust: true,
  1079. spec_value_name: "",
  1080. spec_value_id: "",
  1081. };
  1082. this.spec_tableData.push(model);
  1083. });
  1084. }
  1085. }
  1086. this.spec_tableData.map((e, ei) => {
  1087. e.index = ei + "";
  1088. return e;
  1089. });
  1090. this.spec_tableData.forEach((si, sii) => {
  1091. this.$set(this.spec_tableData, sii, si);
  1092. });
  1093. } else if (code >= 100 && code <= 104) {
  1094. await this.logout();
  1095. } else {
  1096. this.$message.warning(message);
  1097. }
  1098. } else {
  1099. this.spec_tableData.forEach((si, sii) => {
  1100. si.isMust = false;
  1101. this.$set(this.spec_tableData, sii, si);
  1102. });
  1103. }
  1104. },
  1105. //规格编辑修改结果
  1106. refreshEdit(e) {
  1107. let item = JSON.parse(JSON.stringify(e));
  1108. const { index, specid, spec_name, spec_value_id, spec_value_name } = item;
  1109. if (index + "" === "-1") {
  1110. this.spec_tableData.push(item);
  1111. } else {
  1112. let findex = parseInt(index + "");
  1113. this.spec_tableData[findex].specid = specid;
  1114. this.spec_tableData[findex].spec_name = spec_name;
  1115. this.spec_tableData[findex].spec_value_id = spec_value_id;
  1116. this.spec_tableData[findex].spec_value_name = spec_value_name;
  1117. }
  1118. this.showOtherModel = false;
  1119. },
  1120. async submitForm() {
  1121. this.sch_is_noble();
  1122. await this.$refs.ruleForm.validate(async (valid) => {
  1123. if (valid) {
  1124. if (this.spec_tableData.length === 0) {
  1125. this.$message.warning("请选择商品规格!");
  1126. return;
  1127. }
  1128. let isok = true;
  1129. // console.log(this.spec_tableData);
  1130. this.spec_tableData.forEach((si, sii) => {
  1131. if (si.spec_value_id === "") {
  1132. isok = false;
  1133. }
  1134. });
  1135. if (!isok) {
  1136. this.$message.warning("请选择商品规格值缺失!");
  1137. return;
  1138. }
  1139. if (this.loading) return;
  1140. this.loading = true;
  1141. let model = JSON.parse(JSON.stringify(this.ruleForm));
  1142. const { pendtime, is_project, endtime } = model;
  1143. if (
  1144. is_project === "1" &&
  1145. new Date(endtime).getTime() > new Date(pendtime).getTime()
  1146. ) {
  1147. this.$message.warning("竞价截止时间不能晚于项目竞价截止时间!");
  1148. this.loading = false;
  1149. return;
  1150. }
  1151. if (new Date(endtime).getTime() <= new Date().getTime()) {
  1152. this.$message.warning("竞价截止时间应该大于当前时间!");
  1153. this.loading = false;
  1154. return;
  1155. }
  1156. model.khNo = model.khNo.toString();
  1157. // model.platform_code = model.platform_code.toString();
  1158. model.brand_id = model.brand_id.toString();
  1159. model.unit = model.unit.toString();
  1160. model.cat_id = model.cat_id.toString();
  1161. model.config = model.config.toString();
  1162. model.specinfo = [];
  1163. let list = JSON.parse(JSON.stringify(this.spec_tableData));
  1164. list.forEach((a) => {
  1165. let am = {
  1166. specid: a.specid,
  1167. spec_value_id: a.spec_value_id,
  1168. };
  1169. model.specinfo.push(am);
  1170. });
  1171. delete model["pendtime"];
  1172. delete model["arrtime"];
  1173. delete model["puse_desc"];
  1174. delete model["budget_total"];
  1175. delete model["khname"];
  1176. this.loading = false;
  1177. const isCopy = this.type === 'copy-edit'
  1178. const api = isCopy ? asyncRequest.add : asyncRequest.update
  1179. if(isCopy){
  1180. const rootPropertys = ['is_project','endtime','platform_code','platform_code','khNo','companyNo']
  1181. const ladderItem = {}
  1182. Object.keys(model).forEach(key => {
  1183. if(!rootPropertys.includes(key)){
  1184. ladderItem[key] = model[key]
  1185. delete model[key]
  1186. }
  1187. })
  1188. model['ladder'] = []
  1189. model['ladder'][0] = ladderItem
  1190. }
  1191. model.area = this.ruleForm.area
  1192. const res = await api(model)
  1193. this.loading = false;
  1194. if (res && res.code === 0) {
  1195. this.$notify.success({
  1196. title: "创建成功!",
  1197. message: "",
  1198. });
  1199. this.$emit("refresh", true);
  1200. } else if (res && res.code >= 100 && res.code <= 104) {
  1201. await this.logout();
  1202. } else {
  1203. this.$message.warning(res.message);
  1204. }
  1205. } else {
  1206. console.log("error submit!!");
  1207. return false;
  1208. }
  1209. });
  1210. },
  1211. //支付渠道选择
  1212. pay_id_change(e) {
  1213. const { id, code, label } = e;
  1214. this.ruleForm.pay_id = id || "";
  1215. this.pay_name = label || "";
  1216. this.$refs.ruleForm.validateField("pay_id");
  1217. },
  1218. //平台选择
  1219. platform_code_codesearchChange(e) {
  1220. const { id, code, label } = e;
  1221. this.ruleForm.platform_code = id || "";
  1222. this.$refs.ruleForm.validateField("platform_code");
  1223. },
  1224. //品牌选择
  1225. brand_id_searchChange(e) {
  1226. const { id } = e;
  1227. this.ruleForm.brand_id = id ? [id] : [];
  1228. this.$refs.ruleForm.validateField("brand_id");
  1229. },
  1230. unitsearchChange(e) {
  1231. const { code, label } = e;
  1232. this.ruleForm.unit = code ? [code] : [];
  1233. this.unit_name = label || "";
  1234. this.$refs.ruleForm.validateField("unit");
  1235. },
  1236. //销售方公司选择
  1237. company_idsearchChange(e) {
  1238. const { id, code, label } = e;
  1239. this.ruleForm.companyNo = code || "";
  1240. this.$refs.ruleForm.validateField("companyNo");
  1241. },
  1242. //购买方公司选择
  1243. customerChange(e) {
  1244. const { id, code, label, area } = e;
  1245. this.ruleForm.khNo = code ? [code] : [];
  1246. this.ruleForm.customer_name = label ? label : "";
  1247. this.areaLabel = area && area !== '不限区域' ? [area] : []
  1248. this.$refs.ruleForm.validateField("khNo");
  1249. },
  1250. //贵金属种类选择
  1251. noble_metalsearchChange(e) {
  1252. const { id, price } = e;
  1253. this.ruleForm.metal_id = id ? id : "";
  1254. this.$refs.ruleForm.validateField("noble_metal");
  1255. this.ruleForm.gold_price = price ? price : "0";
  1256. this.$refs.ruleForm.validateField("gold_price");
  1257. },
  1258. //商品分类选择
  1259. async goods_class_change(e) {
  1260. const { code, pid, id, label, item } = e;
  1261. this.ruleForm.cat_id = id ? [id] : [];
  1262. this.ruleForm.cat_arr_id = item;
  1263. this.$refs.ruleForm.validateField("cat_id");
  1264. this.is_noble = pid === "6";
  1265. },
  1266. //判断图片规格
  1267. beforeAvatarUpload(file) {
  1268. let isJPG = false,
  1269. isLt2M = false;
  1270. if (file) {
  1271. if (
  1272. file.type === "image/jpg" ||
  1273. file.type === "image/png" ||
  1274. file.type === "image/jpeg"
  1275. ) {
  1276. isJPG = true;
  1277. }
  1278. isLt2M = file.size / 1024 / 1024 < 1;
  1279. if (!isJPG) {
  1280. this.$message.error("图片格式不正确!");
  1281. }
  1282. if (!isLt2M) {
  1283. this.$message.error("图片大小不能超过 1MB!");
  1284. }
  1285. }
  1286. return isJPG && isLt2M;
  1287. },
  1288. //图片上传失败
  1289. UploadErrorEvent(res) {
  1290. if (res !== "break") {
  1291. this.$message.error("图片上传失败!");
  1292. this.ruleForm.good_img = "";
  1293. this.$refs.ruleForm.validateField("good_img");
  1294. }
  1295. },
  1296. //图片上传成功
  1297. async UploadSuccessEvent(data) {
  1298. const { url } = data;
  1299. if (url === "noToken") {
  1300. await this.logout();
  1301. } else {
  1302. this.ruleForm.good_img = url;
  1303. this.$message.success("图片上传成功!");
  1304. this.$refs.ruleForm.validateField("good_img");
  1305. }
  1306. },
  1307. //其他文件上传失败
  1308. UploadErrorOtherenclosure_file(res) {
  1309. if (res !== "break") {
  1310. this.$refs.ruleForm.validateField("enclosure_file");
  1311. }
  1312. },
  1313. //判断其他文件规格
  1314. beforeOtherUpload(file) {
  1315. let isJPG = false;
  1316. if (
  1317. file.type === "application/msword" ||
  1318. file.type ===
  1319. "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
  1320. file.type === "application/vnd.ms-excel" ||
  1321. file.type ===
  1322. "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
  1323. file.type === "application/pdf" ||
  1324. file.type === "application/x-zip-compressed"
  1325. ) {
  1326. isJPG = true;
  1327. }
  1328. let name = file.name;
  1329. let list = name.split(".");
  1330. if (list[list.length - 1] === "rar" || list[list.length - 1] === "7z") {
  1331. isJPG = true;
  1332. }
  1333. const isLt2M = file.size / 1024 / 1024 < 5;
  1334. if (!isJPG) {
  1335. this.$message.error("文件格式不正确!");
  1336. }
  1337. if (!isLt2M) {
  1338. this.$message.error("文件大小不能超过 5MB!");
  1339. }
  1340. return isJPG && isLt2M;
  1341. },
  1342. deleteUrl() {
  1343. this.ruleForm.enclosure_file = "";
  1344. this.$refs.ruleForm.validateField("enclosure_file");
  1345. },
  1346. // 其他文件上传成功
  1347. async UploadSuccessOtherenclosure_file(data) {
  1348. const { url } = data;
  1349. if (url === "noToken") {
  1350. await this.logout();
  1351. } else {
  1352. this.ruleForm.enclosure_file = url;
  1353. this.$message.success("附件上传成功!");
  1354. }
  1355. },
  1356. getNewTime() {
  1357. this.fnewTime = new Date().valueOf();
  1358. },
  1359. },
  1360. };
  1361. </script>
  1362. <style lang="scss" scoped>
  1363. .lsac {
  1364. font-weight: bold;
  1365. font-size: 14px;
  1366. // position: absolute;
  1367. color: #777;
  1368. // top: 0;
  1369. // right: 0;
  1370. }
  1371. </style>