detail.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. <template>
  2. <view class="detail" @click="handleClickOutside">
  3. <u-navbar class="nav_bar" title="商品详情档案" :autoBack="true" :placeholder="true" rightIcon="more-dot-fill"
  4. v-hideNav></u-navbar>
  5. <u-swiper :list="imgsUrl" keyName="url" indicator indicatorMode="line" circular>
  6. <!-- <template v-slot:item="{ item, index }">
  7. <view style="width: 100%; height: 600rpx;">
  8. <image :src="item.url" mode="aspectFill" style="width: 100%; height: 100%; object-fit: cover;"></image>
  9. </view>
  10. </template> -->
  11. </u-swiper>
  12. <!-- 立即下架按钮 -->
  13. <view class="immediate_off_shelf">
  14. <u-button type="error" shape="circle" size="large" @click="handleOffShelf" :disabled="lockStatus === '1'">
  15. <u-icon :name="downStatus == '0' ? 'arrow-upward' : 'arrow-downward'" size="38rpx"
  16. color="#ffffff"></u-icon>
  17. <text>{{ downStatus == '0' ? '立即上架' : '立即下架' }}</text>
  18. </u-button>
  19. </view>
  20. <!-- 轮播图下方操作按钮 -->
  21. <view class="swiper_actions">
  22. <view class="action_item" @click="handleDownload">
  23. <u-icon name="download" size="44rpx" color="#606266"></u-icon>
  24. <text class="action_text">下载图文</text>
  25. </view>
  26. <view class="action_item" @click="handleShare">
  27. <u-icon name="share" size="44rpx" color="#606266"></u-icon>
  28. <text class="action_text">分享</text>
  29. </view>
  30. <view class="action_item" @click="handleEditImgs">
  31. <u-icon name="camera" size="44rpx" color="#606266"></u-icon>
  32. <text class="action_text">编辑图片</text>
  33. <u-modal :show="showEditImgsModal" title="编辑图片" showCancelButton @confirm="confirmEditImgs" @cancel="cancelEditImgs">
  34. <imgs-row-scroll v-if="tempImgsUrl.length > 0" :isShowDeleteIcon="true" keyName="url"
  35. @deleteImgInfo="getDeleteImgInfo" imgMode="aspectFill" :totalWidth="400" :images="tempImgsUrl"
  36. :previewEnabled="true" :imageWidth="150" :imageHeight="150"></imgs-row-scroll>
  37. <u-upload @afterRead="afterRead" multiple></u-upload>
  38. </u-modal>
  39. </view>
  40. <view class="action_item" @click="handleCutImg">
  41. <u-icon name="cut" size="44rpx" color="#606266"></u-icon>
  42. <text class="action_text">智能抠图</text>
  43. </view>
  44. </view>
  45. <!-- 核心信息区域 -->
  46. <view class="core_info">
  47. <view class="section_title">核心信息</view>
  48. <view class="info_row">
  49. <view class="info_label">品牌</view>
  50. <view class="info_value" @click.stop="showBrandlList()">
  51. <!-- <u-input v-if="editMode.dictLabel" v-model="tempValues.dictLabel" :autoFocus="true" @blur="!globalEditMode && saveEditField('dictLabel', tempValues.dictLabel, 'dictLabel')" /> -->
  52. <span>{{ coreInfo.dictLabel || '-' }}</span>
  53. <BrandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></BrandList>
  54. </view>
  55. </view>
  56. <view class="info_row">
  57. <view class="info_label">型号</view>
  58. <view class="info_value" @click.stop="toggleEditField('model', coreInfo.model)">
  59. <u-input v-if="editMode.model" v-model="tempValues.model" :autoFocus="true"
  60. @blur="!globalEditMode && saveEditField('model', tempValues.model, 'model')" />
  61. <span v-else>{{ coreInfo.model || '-' }}</span>
  62. </view>
  63. </view>
  64. <view class="info_row">
  65. <view class="info_label">独立编码</view>
  66. <view class="info_value code" @click.stop="toggleEditField('indentifyCode', coreInfo.indentifyCode)">
  67. <u-input v-if="editMode.indentifyCode" v-model="tempValues.indentifyCode" :autoFocus="true"
  68. @blur="!globalEditMode && saveEditField('indentifyCode', tempValues.indentifyCode, 'indentifyCode')" />
  69. <span v-else>{{ coreInfo.indentifyCode || '-' }}</span>
  70. </view>
  71. </view>
  72. <view class="info_row">
  73. <view class="info_label">入库日期</view>
  74. <view class="info_value">{{ coreInfo.createTime || '-' }}</view>
  75. </view>
  76. <view class="info_row">
  77. <view class="info_label">付款方式</view>
  78. <view class="info_value">{{ payTypeFormatter(coreInfo.payType) }}</view>
  79. </view>
  80. <view class="info_row col">
  81. <view class="info_label">备注信息</view>
  82. <view class="info_value note" @click.stop="toggleEditField('desc', coreInfo.desc)">
  83. <textarea v-if="editMode.desc" v-model="tempValues.desc" :autoFocus="true" rows="3"
  84. @blur="!globalEditMode && saveEditField('desc', tempValues.desc, 'desc')" />
  85. <span v-else>{{ coreInfo.desc || '-' }}</span>
  86. </view>
  87. </view>
  88. </view>
  89. <!-- 财务与价格区域 -->
  90. <view class="finance_price">
  91. <view class="section_title">财务与价格</view>
  92. <view class="price_group">
  93. <view class="price_item">
  94. <view class="price_label">总成本价</view>
  95. <view class="price_value original"
  96. @click.stop="toggleEditField('costPrice', coreInfo.costPrice)">
  97. <u-input v-if="editMode.costPrice" v-model="tempValues.costPrice" :autoFocus="true"
  98. @blur="!globalEditMode && saveEditField('costPrice', tempValues.costPrice, 'costPrice')" />
  99. <span v-else>¥{{ coreInfo.costPrice || '-' }}</span>
  100. </view>
  101. </view>
  102. <view class="price_item">
  103. <view class="price_label">同行价格</view>
  104. <view class="price_value additional"
  105. @click.stop="toggleEditField('peerPrice', coreInfo.peerPrice)">
  106. <u-input v-if="editMode.peerPrice" v-model="tempValues.peerPrice" :autoFocus="true"
  107. @blur="!globalEditMode && saveEditField('peerPrice', tempValues.peerPrice, 'peerPrice')" />
  108. <span v-else>¥{{ coreInfo.peerPrice || '-' }}</span>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="price_group">
  113. <view class="price_item">
  114. <view class="price_label">代理价格</view>
  115. <view class="price_value agent" @click.stop="toggleEditField('agentPrice', coreInfo.agentPrice)">
  116. <u-input v-if="editMode.agentPrice" v-model="tempValues.agentPrice" :autoFocus="true"
  117. @blur="!globalEditMode && saveEditField('agentPrice', tempValues.agentPrice, 'agentPrice')" />
  118. <span v-else>¥{{ coreInfo.agentPrice || '-' }}</span>
  119. </view>
  120. </view>
  121. <view class="price_item">
  122. <view class="price_label">销售价格</view>
  123. <view class="price_value suggested"
  124. @click.stop="toggleEditField('salePrice', coreInfo.salePrice)">
  125. <u-input v-if="editMode.salePrice" v-model="tempValues.salePrice" :autoFocus="true"
  126. @blur="!globalEditMode && saveEditField('salePrice', tempValues.salePrice, 'salePrice')" />
  127. <span v-else>¥{{ coreInfo.salePrice || '-' }}</span>
  128. </view>
  129. </view>
  130. </view>
  131. <view class="price_group">
  132. <view class="price_item">
  133. <view class="price_label">官方指导价</view>
  134. <view class="price_value original" @click.stop="toggleEditField('price', coreInfo.price)">
  135. <u-input v-if="editMode.price" v-model="tempValues.price" :autoFocus="true"
  136. @blur="!globalEditMode && saveEditField('price', tempValues.price, 'price')" />
  137. <span v-else>¥{{ coreInfo.price || '-' }}</span>
  138. </view>
  139. </view>
  140. <view class="price_item"></view>
  141. </view>
  142. </view>
  143. <!-- 溯源与位置区域 -->
  144. <view class="traceability_productPosition">
  145. <view class="section_title">溯源与位置</view>
  146. <view class="info_row">
  147. <view class="info_label">商品位置</view>
  148. <view class="info_value" @click.stop="toggleEditField('productPosition', coreInfo.productPosition)">
  149. <u-input v-if="editMode.productPosition" v-model="tempValues.productPosition" :autoFocus="true"
  150. @blur="!globalEditMode && saveEditField('productPosition', tempValues.productPosition, 'productPosition')" />
  151. <span v-else>{{ coreInfo.productPosition || '-' }}</span>
  152. </view>
  153. </view>
  154. <view class="info_row">
  155. <view class="info_label">回收人员</view>
  156. <view class="info_value" @click.stop="showRecyclePersonPicker">
  157. <span>{{ coreInfo.recyclePerson || '-' }}</span>
  158. <personPicker ref="recyclePersonPickerRef" title="请选择回收人员"
  159. @selectPerson="handleSelectRecyclePerson">
  160. </personPicker>
  161. </view>
  162. </view>
  163. <view class="info_row">
  164. <view class="info_label">鉴定人员</view>
  165. <view class="info_value" @click.stop="showIdentifyingPersonPicker">
  166. <span>{{ coreInfo.identifyingPerson || '-' }}</span>
  167. <personPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员"
  168. @selectPerson="handleSelectIdentifyingPerson"></personPicker>
  169. </view>
  170. </view>
  171. <view class="action_button">
  172. <u-button type="primary" plain size="mini" @click="viewLog">查看操作日志({{ coreInfo.logTotal ||
  173. '-'}}条)</u-button>
  174. <u-modal :show="logShow" title="日志" :closeOnClickOverlay="true" :showConfirmButton="false"
  175. @close="logShow = false">
  176. <view class="log_list">
  177. <view v-for="value in logList" :key="value.id" class="log_item">
  178. {{ value.createTime }}{{ value.name }}{{ value.operation }}
  179. </view>
  180. </view>
  181. </u-modal>
  182. </view>
  183. </view>
  184. <!-- 底部功能按钮栏 -->
  185. <view class="bottom_bar">
  186. <view class="bar_item" @click.stop="globalEditMode ? handleClickOutside() : enterGlobalEdit()">
  187. <u-icon :name="globalEditMode ? 'checkbox-mark' : 'edit-pen'" size="46rpx"
  188. :color="globalEditMode ? '#10b981' : '#9ca3af'"></u-icon>
  189. <text class="bar_text">{{ globalEditMode ? '确定' : '编辑' }}</text>
  190. </view>
  191. <view class="bar_item" @click.stop="lockGoods">
  192. <u-icon :name="lockStatus === '1' ? 'lock-open' : 'lock'" size="46rpx" color="#9ca3af"></u-icon>
  193. <text class="bar_text">{{ lockStatus === '1' ? '解锁' : '锁单' }}</text>
  194. </view>
  195. <view class="bar_item">
  196. <image class="bar_icon" src="../../../static//icons/print.png" alt=""></image>
  197. <text class="bar_text">打印</text>
  198. </view>
  199. <view :class="['bar_item', { 'disabled': lockStatus === '1' }]" @click="handleOpenOrder">
  200. <view class="primary">
  201. <u-icon name="bag" size="44rpx" color="#fff"></u-icon>
  202. <text class="bar_text">开单</text>
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. </template>
  208. <script>
  209. import BrandList from '@/components/brand-list/index.vue'
  210. import personPicker from '@/components/person-picker/index.vue'
  211. import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
  212. export default {
  213. components: {
  214. BrandList,
  215. personPicker,
  216. imgsRowScroll,
  217. },
  218. data() {
  219. return {
  220. // 核心信息模拟数据
  221. coreInfo: {},
  222. // 编辑状态管理
  223. editMode: {
  224. model: false,
  225. indentifyCode: false,
  226. desc: false,
  227. costPrice: false,
  228. peerPrice: false,
  229. agentPrice: false,
  230. salePrice: false,
  231. price: false,
  232. productPosition: false,
  233. },
  234. // 全局编辑模式
  235. globalEditMode: false,
  236. // 临时存储编辑值
  237. tempValues: {},
  238. goodsId: '',
  239. logShow: false,
  240. logList: [],
  241. imgsUrl: [],
  242. lockStatus: '',//锁单状态 0:未锁单 1:已锁单
  243. downStatus: '',//下架状态 0:已下架 1:已上架
  244. showEditImgsModal: false,
  245. tempImgsUrl: [],
  246. }
  247. },
  248. onLoad(options) {
  249. this.goodsId = options.id;
  250. this.getGoodsDetail();
  251. },
  252. methods: {
  253. // 分享
  254. handleShare() {
  255. uni.showToast({
  256. title: '分享功能暂未开放',
  257. icon: 'none'
  258. })
  259. },
  260. // 智能抠图
  261. handleCutImg() {
  262. uni.showToast({
  263. title: '智能抠图功能暂未开放',
  264. icon: 'none'
  265. })
  266. },
  267. payTypeFormatter(val){
  268. switch (val) {
  269. case '1':
  270. return '微信'
  271. case '2':
  272. return '支付宝'
  273. case '3':
  274. return '银行卡'
  275. case '4':
  276. return '现金'
  277. case '5':
  278. return '数字货币'
  279. case '6':
  280. return '挂账'
  281. default:
  282. return '-'
  283. }
  284. },
  285. // 锁单
  286. lockGoods() {
  287. uni.$u.api.wareHouseLock({
  288. id: this.goodsId,
  289. lockStatus: this.lockStatus === '1' ? '0' : '1',
  290. }).then(res => {
  291. uni.showToast({
  292. type: "success",
  293. title: this.lockStatus === '1' ? '解锁成功' : '锁单成功',
  294. icon: 'success'
  295. })
  296. this.getGoodsDetail();
  297. }).catch((error) => {
  298. uni.showToast({
  299. title: error || '操作失败',
  300. icon: 'none'
  301. })
  302. })
  303. },
  304. showRecyclePersonPicker() {
  305. this.$refs.recyclePersonPickerRef.open();
  306. },
  307. // 处理选中回收人员
  308. handleSelectRecyclePerson(person) {
  309. this.coreInfo.recyclePerson = person.label;
  310. this.coreInfo.recyclePersonId = person.id;
  311. this.submitEdit(this.coreInfo)
  312. },
  313. // 显示鉴定人员选择器
  314. showIdentifyingPersonPicker() {
  315. this.$refs.identifyingPersonPickerRef.open();
  316. },
  317. // 处理选中鉴定人员
  318. handleSelectIdentifyingPerson(person) {
  319. this.coreInfo.identifyingPerson = person.label;
  320. this.coreInfo.identifyingPersonId = person.id;
  321. this.submitEdit(this.coreInfo)
  322. },
  323. // 显示品牌列表
  324. showBrandlList() {
  325. this.$refs.brandListRef.showBrandList();
  326. },
  327. // 处理选中品牌
  328. handleSelectedBrand(info) {
  329. this.coreInfo.dictLabel = info.dictLabel;
  330. this.coreInfo.dictValue = info.dictValue;
  331. this.submitEdit(this.coreInfo)
  332. },
  333. // 获取商品详情
  334. getGoodsDetail() {
  335. uni.$u.api.wareHouseDetail({
  336. id: this.goodsId,
  337. userId: this.$store.state.user.userInfo.userId,
  338. }).then(res => {
  339. this.coreInfo = res.data;
  340. this.imgsUrl = res.data.goodPicFileList || [];
  341. this.lockStatus = res.data.lockStatus;
  342. this.downStatus = res.data.downStatus;
  343. });
  344. },
  345. // 打开销售业务开单页面
  346. handleOpenOrder() {
  347. if (this.lockStatus === '1') {
  348. uni.showToast({
  349. title: '已锁单,不能开单',
  350. icon: 'none'
  351. })
  352. return
  353. }
  354. const params = {
  355. id: this.goodsId,
  356. url: this.imgsUrl[0]?.url,
  357. dictLabel: this.coreInfo.dictLabel,
  358. dictValue: this.coreInfo.dictValue,
  359. model: this.coreInfo.model,
  360. agentPrice: this.coreInfo.agentPrice,
  361. price: this.coreInfo.price,
  362. recyclePerson: this.coreInfo.recyclePerson,
  363. recyclePersonId: this.coreInfo.recyclePersonId,
  364. createTime: this.coreInfo.createTime,
  365. }
  366. uni.navigateTo({
  367. url: '/pages/wareHouse/components/openOrder?params=' + JSON.stringify(params),
  368. });
  369. },
  370. viewLog() {
  371. uni.$u.api.wareHouseLog({
  372. id: this.goodsId,
  373. userId: this.$store.state.user.userInfo.userId,
  374. }).then(res => {
  375. this.logList = res.data;
  376. this.logShow = true;
  377. });
  378. },
  379. // 立即下架按钮
  380. handleOffShelf() {
  381. if (this.lockStatus === '1') {
  382. uni.showToast({
  383. title: '已锁单,不能下架',
  384. icon: 'none'
  385. })
  386. return
  387. }
  388. uni.$u.api.wareHouseDown({
  389. id: this.goodsId,
  390. downStatus: this.downStatus === '1' ? '0' : '1',
  391. }).then(() => {
  392. uni.showToast({
  393. title: this.downStatus === '1' ? '下架成功' : '上架成功',
  394. icon: 'success'
  395. })
  396. this.getGoodsDetail();
  397. }).catch(() => {
  398. uni.showToast({
  399. title: '操作失败',
  400. icon: 'none'
  401. })
  402. })
  403. },
  404. // 切换单个字段的编辑状态
  405. toggleEditField(field, value) {
  406. // 如果不是全局编辑模式
  407. if (!this.globalEditMode) {
  408. // 重置所有编辑状态
  409. this.resetEditMode();
  410. // 设置当前字段为编辑状态
  411. this.editMode[field] = true;
  412. // 保存临时值
  413. this.tempValues[field] = value;
  414. }
  415. },
  416. // 保存单个字段的编辑值
  417. saveEditField(field, newValue, fieldName) {
  418. this.coreInfo[fieldName] = newValue;
  419. this.editMode[field] = false;
  420. delete this.tempValues[field];
  421. console.log(`保存${field}字段值: ${newValue}`);
  422. this.submitEdit(this.coreInfo);
  423. },
  424. // 进入全局编辑模式
  425. enterGlobalEdit() {
  426. this.globalEditMode = true;
  427. // 设置所有可编辑字段为编辑状态
  428. this.editMode = {
  429. model: true,
  430. indentifyCode: true,
  431. desc: true,
  432. costPrice: true,
  433. peerPrice: true,
  434. agentPrice: true,
  435. salePrice: true,
  436. price: true,
  437. productPosition: true,
  438. };
  439. // 保存所有字段的临时值
  440. this.tempValues = { ...this.coreInfo }
  441. },
  442. // 重置所有编辑状态
  443. resetEditMode() {
  444. Object.keys(this.editMode).forEach(key => {
  445. this.editMode[key] = false;
  446. });
  447. },
  448. submitEdit(info) {
  449. const data = {
  450. id: this.goodsId,
  451. goodPicFileList: this.imgsUrl,
  452. dictLabel: info.dictLabel,
  453. dictValue: info.dictValue,
  454. model: info.model,
  455. indentifyCode: info.indentifyCode,
  456. createTime: info.createTime,
  457. payType: info.payType,
  458. desc: info.desc,
  459. costPrice: info.costPrice,
  460. peerPrice: info.peerPrice,
  461. agentPrice: info.agentPrice,
  462. salePrice: info.salePrice,
  463. price: info.price,
  464. productPosition: info.productPosition,
  465. recyclePerson: info.recyclePerson,
  466. recyclePersonId: info.recyclePersonId,
  467. identifyingPerson: info.identifyingPerson,
  468. identifyingPersonId: info.identifyingPersonId,
  469. }
  470. uni.$u.api.wareHouseUpdate(data).then(res => {
  471. uni.showToast({
  472. title: '编辑成功',
  473. icon: 'success'
  474. });
  475. this.getGoodsDetail();
  476. this.$emit('editSuccess')
  477. }).catch(() => {
  478. uni.showToast({
  479. title: '操作失败',
  480. icon: 'none'
  481. })
  482. })
  483. },
  484. // 点击页面其他地方保存所有编辑
  485. handleClickOutside() {
  486. if (this.globalEditMode) {
  487. this.submitEdit(this.tempValues)
  488. // 全局编辑模式下,点击外部区域重置所有编辑
  489. this.globalEditMode = false;
  490. // 退出所有编辑状态
  491. this.resetEditMode();
  492. // 清空临时值,恢复初始状态
  493. this.tempValues = {};
  494. } else {
  495. // 保存当前正在编辑的字段
  496. Object.keys(this.editMode).forEach(key => {
  497. if (this.editMode[key]) {
  498. this.saveEditField(key, this.tempValues[key], key);
  499. }
  500. });
  501. }
  502. },
  503. handleDownload() {
  504. if (this.imgsUrl.length == 0) {
  505. uni.showToast({
  506. title: '暂无图片',
  507. icon: 'none'
  508. })
  509. return;
  510. }
  511. uni.showModal({
  512. title: '保存图片',
  513. content: `是否将 ${this.imgsUrl.length} 张图片保存到本地相册?`,
  514. confirmText: '保存',
  515. success: (res) => {
  516. if (res.confirm) {
  517. this.saveImagesToLocal(this.imgsUrl);
  518. }
  519. }
  520. })
  521. },
  522. saveImagesToLocal(allUrls) {
  523. uni.showToast({
  524. title: '图片保存中...',
  525. icon: 'loading'
  526. })
  527. allUrls.forEach((item, index) => {
  528. uni.downloadFile({
  529. url: item.url,
  530. success: (res) => {
  531. if (res.statusCode === 200) {
  532. uni.saveImageToPhotosAlbum({
  533. filePath: res.tempFilePath,
  534. success() {
  535. uni.showToast({
  536. title: '保存成功'
  537. })
  538. },
  539. fail: (err) => {
  540. console.error('保存到相册失败:', err);
  541. // 如果是权限问题,尝试请求权限
  542. if (err.errMsg.includes('auth denied')) {
  543. uni.showModal({
  544. title: '权限不足',
  545. content: '需要访问相册权限来保存图片,是否去设置?',
  546. success: (modalRes) => {
  547. if (modalRes.confirm) {
  548. // 打开设置页面
  549. uni.openSetting({
  550. success: (settingRes) => {
  551. console.log('设置页面结果:', settingRes);
  552. }
  553. });
  554. }
  555. }
  556. });
  557. }
  558. reject(err);
  559. }
  560. })
  561. }
  562. }
  563. })
  564. })
  565. },
  566. handleEditImgs() {
  567. this.showEditImgsModal = true;
  568. this.tempImgsUrl = this.imgsUrl
  569. },
  570. getDeleteImgInfo(imgInfo) {
  571. this.tempImgsUrl = imgInfo.newImages
  572. },
  573. afterRead(info) {
  574. info.file.forEach(item=>{
  575. uni.$u.api.uploadFile(item.url).then((res) => {
  576. this.tempImgsUrl.push({url:res.data.url});
  577. uni.$u.toast("文件上传成功");
  578. }).catch(() => {
  579. uni.$u.toast("上传文件失败");
  580. })
  581. })
  582. },
  583. confirmEditImgs() {
  584. this.imgsUrl = this.tempImgsUrl
  585. this.submitEdit(this.coreInfo)
  586. this.showEditImgsModal = false;
  587. },
  588. cancelEditImgs() {
  589. this.tempImgsUrl = []
  590. this.showEditImgsModal = false;
  591. }
  592. }
  593. }
  594. </script>
  595. <style lang="scss" scoped>
  596. @import "../styles/detail.scss";
  597. </style>