li.shaoyi 3 years ago
parent
commit
fa330e8415

+ 1 - 2
src/business/customs/bonded.ts

@@ -54,7 +54,7 @@ export function useBSFWOrderDetail(selectedRow: Ermcp.GZBSFWOrderRsp) {
         { prop: 'netweigthct', label: '净重(克拉)', show: true },
         { prop: 'netweigthgm', label: '净重(克)', show: true },
         { prop: 'grossweightgm', label: '毛重(克)', show: true },
-        { prop: 'perprice', label: '单价(美元/克拉)', show: true },
+        { prop: 'perprice', label: '单价(美元/克拉)', width: 180, show: true },
         { prop: 'totalamount', label: '总值(美元)', show: true },
         { prop: 'colorinfo', label: '彩钻颜色', show: true },
         { prop: 'remark', label: '其它', show: true },
@@ -152,7 +152,6 @@ export function useBSFWMemberOperate(orderId: string) {
         OperateType: 0, // 操作类型,必填,1:上传发货单2:上传盖章单据3:确认预付款
         FileDetails: [], // 文件列表
         Remark: '', // 备注
-        GZBSDeliveryType: 0, // 收货方式,OperateType=1:上传发货单时必填,枚举“GZBSDeliveryType”
         OtherLogistics: '', // 指定其它物流,OperateType=1:上传发货单时填写
         ClientType: ClientType.Web, // 终端类型
         ClientSerialNo: '', // 客户端流水号

+ 3 - 3
src/business/table/index.ts

@@ -336,9 +336,9 @@ const pcTableColumnMap = new Map<TableColumnKey, Ermcp.TableColumn[]>([
     ]],
     // 交易服务-出境检测
     ['customs_cjjc', [
-        { prop: 'orderno', label: '单据编号' },
+        { prop: 'orderno', label: '单据编号', width: 180 },
         { prop: 'gzcjcategorytypedisplay', label: '货物品类' },
-        { prop: 'gzcjdeliverytypedisplay', label: '收货方式' },
+        { prop: 'gzcjdeliverytypedisplay', label: '收货方式', width: 200 },
         { prop: 'gzcjaccount', label: '送检账户' },
         { prop: 'undefined', label: '总数量(粒)' },
         { prop: 'undefined', label: '总重量(ct)' },
@@ -350,7 +350,7 @@ const pcTableColumnMap = new Map<TableColumnKey, Ermcp.TableColumn[]>([
     ]],
     // 交易服务-保税服务
     ['customs_bsfw', [
-        { prop: 'orderno', label: '单据编号' },
+        { prop: 'orderno', label: '单据编号', width: 180 },
         { prop: 'contentrange', label: '内容' },
         { prop: 'totalnetweigthct', label: '总净重(克拉)' },
         { prop: 'totalnetweightgm', label: '总净重(克)' },

+ 4 - 0
src/packages/pc/components/layouts/page/index.less

@@ -38,6 +38,10 @@
         }
     }
 
+    &__wrapper &__main {
+        min-height: 100%;
+    }
+
     &__wrapper &__tabs {
         flex: 1;
         overflow: hidden;

+ 4 - 5
src/packages/pc/components/modules/performance-rule/index.less

@@ -1,22 +1,21 @@
 .app-performance-rule {
-    display   : flex;
-    margin-top: 8px;
+    display: flex;
 
     &:empty {
         display: none;
     }
 
     .block {
-        display       : flex;
+        display: flex;
         flex-direction: column;
-        align-items   : center;
+        align-items: center;
 
         &:not(:first-child) {
             margin-left: 10px;
         }
 
         &-label {
-            font-size : 12px;
+            font-size: 12px;
             margin-top: 4px;
         }
     }

+ 6 - 2
src/packages/pc/components/modules/performance/index.less

@@ -1,13 +1,17 @@
 .app-performance {
     &-item {
-        height     : auto;
-        padding    : 10px;
+        height: auto;
+        padding: 10px;
         line-height: 1;
 
         &:not(:first-child) {
             border-top: 1px solid #efefef;
         }
 
+        &__title {
+            margin-bottom: 8px;
+        }
+
         &.selected &__title {
             font-weight: bold;
         }

+ 14 - 3
src/packages/pc/views/customs/bonded/components/download/index.vue

@@ -1,10 +1,14 @@
 <!-- 交易服务-出境检测-文件下载 -->
 <template>
-    <app-drawer title="提示" :width="800" v-model:show="show">
+    <app-drawer title="下载" :width="800" v-model:show="show">
         <app-table :data="dataList" :loading="loading" :columns="columns" :show-header="false" border>
+            <!-- 生成时间 -->
+            <template #operatetime="{ value }">
+                {{ formatDate(value) }}
+            </template>
             <!-- 操作 -->
-            <template #operate>
-                <el-button size="small">下载</el-button>
+            <template #operate="{ row }">
+                <el-button size="small" @click="downloadFile(row.fileaddress)">下载</el-button>
             </template>
         </app-table>
     </app-drawer>
@@ -12,6 +16,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
+import { getUrl, formatDate } from '@/filters'
 import { useGZCJBSOrderFileList } from '@/business/customs/bonded'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppTable from '@pc/components/base/table/index.vue'
@@ -33,5 +38,11 @@ const orderId = (() => {
 const { loading, dataList, columns, getGZCJBSOrderFileList } = useGZCJBSOrderFileList(orderId)
 const show = shallowRef(true)
 
+const downloadFile = (file?: string) => {
+    if (file) {
+        window.location.href = getUrl(file).href
+    }
+}
+
 getGZCJBSOrderFileList()
 </script>

+ 18 - 7
src/packages/pc/views/customs/bonded/components/upload-bill/index.vue

@@ -54,7 +54,13 @@ const formRules: FormRules = {
     }],
     FileDetails: [{
         required: true,
-        message: '请上传发货单'
+        validator: (rule, value, callback) => {
+            if (formData.FileDetails.length) {
+                callback()
+            } else {
+                callback(new Error('请上传发货单'))
+            }
+        }
     }],
 }
 
@@ -68,15 +74,20 @@ const onUploadChange = (files: { fileName: string, filePath: string }[]) => {
         FileName: e.fileName,
         FilePath: e.filePath,
     }))
+    formRef.value?.validateField('FileDetails')
 }
 
 const onSubmit = () => {
-    formData.OperateType = 1
-    formSubmit().then(() => {
-        ElMessage.success('提交成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('提交失败:' + err)
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            formData.OperateType = 1
+            formSubmit().then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
     })
 }
 </script>

+ 20 - 9
src/packages/pc/views/customs/bonded/components/upload-seal/index.vue

@@ -1,7 +1,7 @@
 <!-- 交易服务-保税服务-上传盖章单据 -->
 <template>
     <app-drawer title="上传盖章单据" v-model:show="show" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" label-width="100px" :model="formData" :rules="formRules">
+        <el-form ref="formRef" label-width="80px" :model="formData" :rules="formRules">
             <el-form-item label="单据编号">
                 {{ selectedRow.orderid }}
             </el-form-item>
@@ -13,7 +13,8 @@
                 </app-upload>
             </el-form-item>
         </el-form>
-        <div>请下载文件“出境检测发票装箱单OJK(GIA发,运营收).pdf”, 盖章后上传。</div>
+        <div style="font-size: 12px;color: #999;border: 1px solid #eee;padding: 15px;">
+            请下载文件“出境检测发票装箱单OJK(GIA发,运营收).pdf”, 盖章后上传。</div>
         <template #footer>
             <el-button @click="onCancel(false)" plain>取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
@@ -44,7 +45,13 @@ const formRef = shallowRef<FormInstance>()
 const formRules: FormRules = {
     FileDetails: [{
         required: true,
-        message: '请上传盖章单据'
+        validator: (rule, value, callback) => {
+            if (formData.FileDetails.length) {
+                callback()
+            } else {
+                callback(new Error('请上传盖章单据'))
+            }
+        }
     }],
 }
 
@@ -61,12 +68,16 @@ const onUploadChange = (files: { fileName: string, filePath: string }[]) => {
 }
 
 const onSubmit = () => {
-    formData.OperateType = 2
-    formSubmit().then(() => {
-        ElMessage.success('提交成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('提交失败:' + err)
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            formData.OperateType = 2
+            formSubmit().then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
     })
 }
 </script>

+ 14 - 3
src/packages/pc/views/customs/exit/components/download/index.vue

@@ -1,10 +1,14 @@
 <!-- 交易服务-出境检测-文件下载 -->
 <template>
-    <app-drawer title="提示" :width="800" v-model:show="show">
+    <app-drawer title="下载" :width="800" v-model:show="show">
         <app-table :data="dataList" :loading="loading" :columns="columns" :show-header="false" border>
+            <!-- 生成时间 -->
+            <template #operatetime="{ value }">
+                {{ formatDate(value) }}
+            </template>
             <!-- 操作 -->
-            <template #operate>
-                <el-button size="small">下载</el-button>
+            <template #operate="{ row }">
+                <el-button size="small" @click="downloadFile(row.fileaddress)">下载</el-button>
             </template>
         </app-table>
     </app-drawer>
@@ -12,6 +16,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
+import { getUrl, formatDate } from '@/filters'
 import { useGZCJBSOrderFileList } from '@/business/customs/bonded'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppTable from '@pc/components/base/table/index.vue'
@@ -33,5 +38,11 @@ const orderId = (() => {
 const { loading, dataList, columns, getGZCJBSOrderFileList } = useGZCJBSOrderFileList(orderId)
 const show = shallowRef(true)
 
+const downloadFile = (file?: string) => {
+    if (file) {
+        window.location.href = getUrl(file).href
+    }
+}
+
 getGZCJBSOrderFileList()
 </script>

+ 10 - 0
src/packages/pc/views/trade/buy/components/delisting/index.less

@@ -0,0 +1,10 @@
+.trade-details-delisting {
+    .card-header {
+        font-size: 16px;
+        color: #999;
+    }
+
+    .el-form {
+        margin-top: 20px;
+    }
+}

+ 40 - 28
src/packages/pc/views/trade/buy/components/delisting/index.vue

@@ -1,33 +1,41 @@
 <!-- 挂牌大厅-求购大厅-详情-我的摘牌 -->
 <template>
-    <h3>我的摘牌</h3>
-    <app-table :data="dataList" :columns="columns" :show-header="false" selection-type="single" border
-        @select="onTableSelect">
-        <!-- 价格 -->
-        <template #price="{ row }">
-            {{ row.zscurrencytypedisplayunit + formatDecimal(row.price) }}
-        </template>
-        <!-- 克拉单价 -->
-        <template #priceper="{ row }">
-            {{ row.zscurrencytypedisplayunit + formatDecimal(row.priceper) }}
-        </template>
-    </app-table>
-    <el-form ref="formRef" label-width="80px" :model="formData" :rules="formRules" v-if="dataList.length"
-        style="width:460px">
-        <el-form-item label="价格(¥)" prop="ApplyPrice">
-            <div class="el-form-item--col">
-                <el-input type="number" placeholder="请输入" v-model.number="formData.ApplyPrice" />
-                <span style="white-space:nowrap;"
-                    v-if="selectedGoods && selectedGoods.zscurrencytype !== CurrencyType.CNY">汇率:{{getExrate(selectedGoods.zscurrencytype)}}</span>
+    <el-card class="trade-details-delisting" shadow="never">
+        <template #header>
+            <div class="card-header">
+                <span>我的钻石</span>
             </div>
-        </el-form-item>
-        <el-form-item label="备注" prop="ApplyRemark">
-            <el-input type="textarea" :rows="3" v-model="formData.ApplyRemark" />
-        </el-form-item>
-        <el-form-item>
-            <el-button type="primary" :loading="loading" @click="onSubmit">摘牌申请</el-button>
-        </el-form-item>
-    </el-form>
+        </template>
+        <app-table :data="dataList" :columns="columns" :show-header="false" selection-type="single" border
+            @select="onTableSelect">
+            <!-- 价格 -->
+            <template #price="{ row }">
+                {{ row.zscurrencytypedisplayunit + formatDecimal(row.price) }}
+            </template>
+            <!-- 克拉单价 -->
+            <template #priceper="{ row }">
+                {{ row.zscurrencytypedisplayunit + formatDecimal(row.priceper) }}
+            </template>
+        </app-table>
+        <el-form ref="formRef" label-width="80px" :model="formData" :rules="formRules" v-if="dataList.length"
+            style="width:460px">
+            <el-form-item label="价格(¥)" prop="ApplyPrice">
+                <div class="el-form-item--col">
+                    <el-input type="number" placeholder="请输入" v-model.number="formData.ApplyPrice" />
+                    <span style="white-space:nowrap;"
+                        v-if="selectedGoods && selectedGoods.zscurrencytype !== CurrencyType.CNY">汇率:{{
+                                getExrate(selectedGoods.zscurrencytype)
+                        }}</span>
+                </div>
+            </el-form-item>
+            <el-form-item label="备注" prop="ApplyRemark">
+                <el-input type="textarea" :rows="3" v-model="formData.ApplyRemark" />
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" :loading="loading" @click="onSubmit">摘牌申请</el-button>
+            </el-form-item>
+        </el-form>
+    </el-card>
 </template>
 
 <script lang="ts" setup>
@@ -90,4 +98,8 @@ const onSubmit = () => {
 }
 
 getDiamondList()
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 50 - 0
src/packages/pc/views/trade/buy/components/details/index.less

@@ -0,0 +1,50 @@
+.trade-details {
+    padding: 20px;
+    height: 100%;
+
+    .el-aside {
+        width: 400px;
+
+        .el-card {
+            .card-header {
+                display: flex;
+                align-items: center;
+                font-size: 16px;
+                color: #999;
+                cursor: pointer;
+
+                h4 {
+                    margin-left: 10px;
+                }
+            }
+
+            ul {
+                li {
+                    display: flex;
+                    justify-content: space-between;
+
+                    &:not(:first-child) {
+                        margin-top: 20px;
+                    }
+
+                    >span {
+                        &:first-child {
+                            width: 100px;
+                            color: #94A0AF;
+                        }
+
+                        &:last-child {
+                            flex: 1;
+                            text-align: right;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    .el-main {
+        margin-left: 20px;
+        padding: 0;
+    }
+}

+ 89 - 28
src/packages/pc/views/trade/buy/components/details/index.vue

@@ -1,41 +1,97 @@
 <!-- 挂牌大厅-求购大厅-详情 -->
 <template>
     <teleport :to="teleportTo">
-        <app-view class="app-details" v-bind="$attrs">
-            <template #header>
-                <div>
-                    <el-button @click="$emit('closed')">返回</el-button>
-                </div>
-            </template>
-            <el-descriptions title="求购信息" :column="2">
-                <el-descriptions-item label="委托单号">{{ selectedRow.wrtradeorderid }}</el-descriptions-item>
-                <el-descriptions-item label="买方">{{ selectedRow.buyusername }}</el-descriptions-item>
-                <el-descriptions-item label="钻石分类">{{ selectedRow.zscategorydisplay }}</el-descriptions-item>
-                <el-descriptions-item label="货币类型">{{ selectedRow.zscurrencytypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="尺寸">{{ selectedRow.zssize }}</el-descriptions-item>
-                <el-descriptions-item label="形状">{{ selectedRow.zsshapetypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="净度">{{ selectedRow.zsclaritytypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="对称度">{{ selectedRow.zssymmetrytypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="颜色">{{ selectedRow.zscolortypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="切工">{{ selectedRow.zscuttypedisplay }}</el-descriptions-item>
-                <el-descriptions-item label="荧光">{{ selectedRow.zsfluorescencetypedisplay }}</el-descriptions-item>
-            </el-descriptions>
-            <div>
-                <div>履约规则</div>
-                <app-performance-rule :item="getPerformanceTemplateById(selectedRow.performancetemplateid)" />
-            </div>
-            <template v-for="(auth, index) in getAuthComponents()" :key="index">
-                <component :is="componentMap.get(auth.code)" v-bind="{ selectedRow }" v-if="showComponent" />
-            </template>
-        </app-view>
+        <el-container class="trade-details">
+            <el-aside>
+                <el-card shadow="never">
+                    <template #header>
+                        <div class="card-header" @click="$emit('closed')">
+                            <app-icon icon="ArrowLeftBold" />
+                            <h4>求购信息</h4>
+                        </div>
+                    </template>
+                    <ul>
+                        <li>
+                            <span>委托单号</span>
+                            <span>{{ selectedRow.wrtradeorderid }}</span>
+                        </li>
+                        <li>
+                            <span>买方</span>
+                            <span>{{ selectedRow.buyusername }}</span>
+                        </li>
+                        <li>
+                            <span>钻石分类</span>
+                            <span>{{ selectedRow.zscategorydisplay }}</span>
+                        </li>
+                        <li>
+                            <span>货币类型</span>
+                            <span>{{ selectedRow.zscurrencytypedisplay }}</span>
+                        </li>
+                        <li>
+                            <span>尺寸</span>
+                            <span>{{ handleNoneValue(selectedRow.zssize) }}</span>
+                        </li>
+                        <li>
+                            <span>形状</span>
+                            <span>{{ handleNoneValue(selectedRow.zsshapetypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>净度</span>
+                            <span>{{ handleNoneValue(selectedRow.zsclaritytypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>对称度</span>
+                            <span>{{ handleNoneValue(selectedRow.zssymmetrytypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>颜色</span>
+                            <span>{{ handleNoneValue(selectedRow.zscolortypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>切工</span>
+                            <span>{{ handleNoneValue(selectedRow.zscuttypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>荧光</span>
+                            <span>{{ handleNoneValue(selectedRow.zsfluorescencetypedisplay) }}</span>
+                        </li>
+                        <li>
+                            <span>履约规则</span>
+                            <app-performance-rule
+                                :item="getPerformanceTemplateById(selectedRow.performancetemplateid)" />
+                        </li>
+                        <li>
+                            <span>备注</span>
+                            <span>{{ handleNoneValue(selectedRow.remark) }}</span>
+                        </li>
+                    </ul>
+                </el-card>
+            </el-aside>
+            <el-main>
+                <el-scrollbar>
+                    <template v-for="(auth, index) in components" :key="index">
+                        <component :is="componentMap.get(auth.code)" v-bind="{ selectedRow }" v-if="showComponent" />
+                    </template>
+                </el-scrollbar>
+            </el-main>
+        </el-container>
     </teleport>
 </template>
 
+<script lang="ts">
+import { defineComponent } from 'vue'
+export default defineComponent({
+    inheritAttrs: false,
+})
+</script>
+
 <script lang="ts" setup>
 import { computed, PropType } from 'vue'
+import { handleNoneValue } from '@/filters'
 import { useMenu } from '@/hooks/menu'
 import { useLoginStore, usePerformanceStore } from '@/stores'
 import AppPerformanceRule from '@pc/components/modules/performance-rule/index.vue'
+import AppIcon from '@pc/components/base/icon/index.vue'
 
 const props = defineProps({
     code: String,
@@ -52,9 +108,14 @@ const props = defineProps({
 const { getUserId } = useLoginStore()
 const { componentMap, getAuthComponents } = useMenu(props.code)
 const { getPerformanceTemplateById } = usePerformanceStore()
+const components = getAuthComponents()
 
 // 不能购买自己发布的求购
 const showComponent = computed(() => {
     return props.selectedRow.userid !== getUserId()
 })
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 0 - 2
src/packages/pc/views/warehousing/goods/components/details/index.less

@@ -140,8 +140,6 @@
                 }
 
                 .app-performance-rule {
-                    margin-top: 0;
-
                     .block {
                         width: 25%;
 

+ 1 - 1
src/types/proto/customs.d.ts

@@ -112,7 +112,7 @@ declare global {
             OperateType: number; // 操作类型,必填,1:上传发货单2:上传盖章单据3:确认预付款
             FileDetails: FileDetail[]; // 文件列表
             Remark: string; // 备注
-            GZBSDeliveryType: number; // 收货方式,OperateType=1:上传发货单时必填,枚举“GZBSDeliveryType”
+            GZBSDeliveryType?: number; // 收货方式,OperateType=1:上传发货单时必填,枚举“GZBSDeliveryType”
             OtherLogistics: string; // 指定其它物流,OperateType=1:上传发货单时填写
             ClientType: number; // 终端类型
             ClientSerialNo: string; // 客户端流水号