| | |
| | | <template> |
| | | <div class="simple-text" :class="{ 'is-primary': type === 'primary' }"> |
| | | {{ value }} |
| | | {{ text || value }} |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | text: { |
| | | type: [String, Number], |
| | | default: null, |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | { label: '规格:', id: 'flowerUnit' }, |
| | | { label: '原价(元):', id: 'price' }, |
| | | { label: '券后单价(元):', id: 'realPrice' }, |
| | | { label: '券后总金额(元):', id: 'realTotal' }, |
| | | { label: '供应商价格(元):', id: 'supplierPrice' }, |
| | | { label: '合伙人加价(元):', id: 'markupPartner' }, |
| | | { label: '申请数量:', id: 'num' }, |
| | |
| | | |
| | | <script> |
| | | import AfterSaleTable from '@/components/order/after-sale-table' |
| | | const feeKeys = [ |
| | | 'feeSupplier', |
| | | 'feePlatform', |
| | | 'feePartner', |
| | | 'feePlatformPack', |
| | | 'feePlatformCheck', |
| | | 'feePlatformTransport', |
| | | 'feePackingTransport', |
| | | ] |
| | | export default { |
| | | components: { |
| | | AfterSaleTable, |
| | |
| | | { label: '合伙人加价(元):', id: 'markupPartner', type: 'input' }, |
| | | { label: '原价(元):', id: 'price', type: 'input' }, |
| | | { label: '券后单价(元):', id: 'realPrice', type: 'input' }, |
| | | { label: '券后总金额(元):', id: 'realTotal', type: 'input' }, |
| | | { label: '供应商价格(元):', id: 'supplierPrice', type: 'input' }, |
| | | { label: '商品数量:', id: 'flowerNum', type: 'input' }, |
| | | { label: '申请售后数量:', id: 'num', type: 'input' }, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'row', |
| | | items: [ |
| | | { |
| | | label: '质检总扣款(元):', |
| | | id: 'checkTotalAmount', |
| | | type: 'input', |
| | | span: 24, |
| | | customClass: 'to-red to-bold', |
| | | }, |
| | | { |
| | | label: '降级数量:', |
| | | id: 'reduceNum', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '降级总金额(元):', |
| | | id: 'reduceAmount', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '缺货数量:', |
| | | id: 'lackNum', |
| | | type: 'input', |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: '已退总金额(元):', |
| | | id: 'refundTotalAmount', |
| | | type: 'input', |
| | | span: 24, |
| | | customClass: 'to-red to-bold', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | |
| | | id: 'feePlatformTransport', |
| | | type: 'input-number', |
| | | el: { min: 0, precision: 2, controls: false }, |
| | | }, |
| | | { |
| | | label: '打包运费(元)(散户):', |
| | | id: 'feePackingTransport', |
| | | type: 'input-number', |
| | | el: { min: 0, precision: 2, controls: false }, |
| | | }, |
| | | { |
| | | label: '实际总扣款(元):', |
| | | id: 'tempTotal', |
| | | component: 'simple-text', |
| | | readonly: true, |
| | | forceDisabled: true, |
| | | el: (row) => ({ |
| | | text: feeKeys |
| | | .reduce((total, current) => { |
| | | total += row[current] ?? 0 |
| | | return total |
| | | }, 0) |
| | | .toFixed(2), |
| | | }), |
| | | span: 24, |
| | | customClass: 'to-bold-label', |
| | | }, |
| | | { |
| | | label: '申请理由:', |
| | |
| | | onDetail(item) { |
| | | this.$router.push(`${this.$route.path}/view/${item.id}`) |
| | | }, |
| | | onHandle(item) { |
| | | this.$refs.crud.$refs.extraDialog[0].show(item) |
| | | async onHandle(item) { |
| | | const { code, data } = await this.$elBusHttp.request( |
| | | 'flower/api/sales/list/view', |
| | | { params: { id: item.id } } |
| | | ) |
| | | if (code === 0) { |
| | | feeKeys.forEach((key) => { |
| | | data[key] = data[key] ?? undefined |
| | | }) |
| | | this.$refs.crud.$refs.extraDialog[0].show(data) |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-form-item { |
| | | &.to-bold { |
| | | .el-form-item__label, |
| | | .simple-text, |
| | | .el-bus-form-item__normal { |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | &.to-red { |
| | | .el-form-item__label, |
| | | .simple-text, |
| | | .el-bus-form-item__normal { |
| | | color: $danger-color; |
| | | } |
| | | } |
| | | &.to-bold-label { |
| | | .el-form-item__label { |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |