|
|
@@ -1,10 +1,26 @@
|
|
|
<!-- 询价消息-买方询价-同意/拒绝 -->
|
|
|
<template>
|
|
|
- <app-drawer title="提示" :width="480" v-model:show="show" :loading="loading" :refresh="refresh">
|
|
|
- <el-form ref="formRef" label-width="60px" :model="formData" :rules="formRules">
|
|
|
- <el-form-item>
|
|
|
- <span>是否{{ code === 'bargain_buy_agree' ? '同意' : '拒绝' }}此询价?</span>
|
|
|
- </el-form-item>
|
|
|
+ <app-drawer :title="code === 'bargain_buy_agree' ? '同意' : '拒绝'" :width="720" v-model:show="show" :loading="loading"
|
|
|
+ :refresh="refresh">
|
|
|
+ <app-table-details :label-width="100" :data="selectedRow" :cell-props="detailProps" :column="2">
|
|
|
+ <!-- 价格 -->
|
|
|
+ <template #price>
|
|
|
+ {{ selectedRow.zscurrencytypedisplayunit + formatDecimal(selectedRow.price) }}
|
|
|
+ </template>
|
|
|
+ <!-- 克拉单价 -->
|
|
|
+ <template #priceper>
|
|
|
+ {{ selectedRow.zscurrencytypedisplayunit + formatDecimal(selectedRow.priceper) }}
|
|
|
+ </template>
|
|
|
+ <!-- 我的出价 -->
|
|
|
+ <template #applyprice>
|
|
|
+ {{ selectedRow.zscurrencytypedisplayunit + formatDecimal(selectedRow.applyprice) }}
|
|
|
+ </template>
|
|
|
+ <!-- 申请状态 -->
|
|
|
+ <template #applystatus>
|
|
|
+ {{ getApplyStatusName(selectedRow.applystatus) }}
|
|
|
+ </template>
|
|
|
+ </app-table-details>
|
|
|
+ <el-form ref="formRef" label-width="60px" :model="formData" :rules="formRules" style="margin-top: 20px;">
|
|
|
<el-form-item label="备注" prop="AuditRemark">
|
|
|
<el-input type="textarea" :rows="3" v-model="formData.AuditRemark" />
|
|
|
</el-form-item>
|
|
|
@@ -18,10 +34,13 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { ref, PropType } from 'vue'
|
|
|
-import { ElMessage } from 'element-plus'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
|
+import { formatDecimal } from '@/filters'
|
|
|
+import { getApplyStatusName } from '@/constants/order'
|
|
|
import { useBargainOperate } from '@/business/bargain'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
code: String,
|
|
|
@@ -52,6 +71,26 @@ const formRules: FormRules = {
|
|
|
AuditRemark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
|
|
|
}
|
|
|
|
|
|
+const detailProps = [
|
|
|
+ { prop: 'warehousenamedisplay', label: '仓库' },
|
|
|
+ { prop: 'zsshapetypedisplay', label: '形状' },
|
|
|
+ { prop: 'zscolortype1display', label: '颜色' },
|
|
|
+ { prop: 'zsclaritytype1display', label: '净度' },
|
|
|
+ { prop: 'zscuttype1display', label: '切工' },
|
|
|
+ { prop: 'zspolishtype1display', label: '抛光' },
|
|
|
+ { prop: 'zssymmetrytype1display', label: '对称' },
|
|
|
+ { prop: 'zsfluorescencetype1display', label: '荧光' },
|
|
|
+ { prop: 'sizedisplay', label: '尺寸' },
|
|
|
+ { prop: 'price', label: '价格' },
|
|
|
+ { prop: 'qty', label: '克拉重量' },
|
|
|
+ { prop: 'priceper', label: '克拉单价' },
|
|
|
+ { prop: 'buyusername', label: '买方' },
|
|
|
+ { prop: 'applyprice', label: '买方出价' },
|
|
|
+ { prop: 'applyremark', label: '备注' },
|
|
|
+ { prop: 'applystatus', label: '申请状态' },
|
|
|
+ { prop: 'applytime', label: '申请时间' },
|
|
|
+]
|
|
|
+
|
|
|
const onCancel = (isRefresh = false) => {
|
|
|
show.value = false
|
|
|
refresh.value = isRefresh
|
|
|
@@ -60,11 +99,13 @@ const onCancel = (isRefresh = false) => {
|
|
|
const onSubmit = () => {
|
|
|
formRef.value?.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- formSubmit(operateType).then(() => {
|
|
|
- ElMessage.success('提交成功')
|
|
|
- onCancel(true)
|
|
|
- }).catch((err) => {
|
|
|
- ElMessage.error('提交失败:' + err)
|
|
|
+ ElMessageBox.confirm(`是否${props.code === 'bargain_buy_agree' ? '同意' : '拒绝'}此询价?`).then(() => {
|
|
|
+ formSubmit(operateType).then(() => {
|
|
|
+ ElMessage.success('提交成功')
|
|
|
+ onCancel(true)
|
|
|
+ }).catch((err) => {
|
|
|
+ ElMessage.error('提交失败:' + err)
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
})
|