|
|
@@ -0,0 +1,891 @@
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { useDataTable } from '@/hooks/datatable'
|
|
|
+import { queryBuyOrder, querySellOrder, queryMyBuyOrder, queryMySellOrder, queryMyDeListing, queryMyBargainApply, queryMyDelistingApply } from '@/services/api/order'
|
|
|
+import { sessionData } from '@/stores'
|
|
|
+import { Category, getCategoryList } from '@/constants/enum/diamond'
|
|
|
+
|
|
|
+/**
|
|
|
+ * 求购大厅
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+export function useBuyOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, getQueryParam, resetFilter } = useDataTable<Ermcp.BuyOrderRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderid',
|
|
|
+ label: '委托单号',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'buyusername',
|
|
|
+ label: '买方',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscategorydisplay',
|
|
|
+ label: '商品分类',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zstabledisplay',
|
|
|
+ label: '求购信息',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '状态',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'validtime',
|
|
|
+ label: '有效日期',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '委托时间',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ width: 180,
|
|
|
+ }
|
|
|
+ ])
|
|
|
+
|
|
|
+ // 获取求购大厅委托单
|
|
|
+ const getBuyOrderList = () => {
|
|
|
+ const param = getQueryParam()
|
|
|
+ loading.value = true
|
|
|
+ return queryBuyOrder({
|
|
|
+ data: {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ zscategory: param.zscategory,
|
|
|
+ wrtradeorderid: param.wrtradeorderid,
|
|
|
+ zsallproperties: param.zstabledisplay,
|
|
|
+ buyusername: param.buyusername,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ selectList.value = [
|
|
|
+ {
|
|
|
+ label: '商品分类',
|
|
|
+ key: 'zscategory',
|
|
|
+ options: getCategoryList(),
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ inputList.value = [
|
|
|
+ { label: '单号', keys: ['wrtradeorderid'], type: 'number' },
|
|
|
+ { label: '买方', keys: ['buyusername'] },
|
|
|
+ { label: '商品', keys: ['zstabledisplay'] },
|
|
|
+ ]
|
|
|
+
|
|
|
+ const [reset, search] = buttonList.value
|
|
|
+ reset.onClick = () => {
|
|
|
+ resetFilter()
|
|
|
+ getBuyOrderList()
|
|
|
+ }
|
|
|
+ search.onClick = getBuyOrderList
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ inputList,
|
|
|
+ selectList,
|
|
|
+ buttonList,
|
|
|
+ getBuyOrderList,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 出售大厅
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+export function useSellOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, getQueryParam, resetFilter } = useDataTable<Ermcp.SellOrderRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderid',
|
|
|
+ label: '委托单号',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sellusername',
|
|
|
+ label: '卖方',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscategorydisplay',
|
|
|
+ label: '商品分类',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'goodsno',
|
|
|
+ label: '商品编号',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'totalqty',
|
|
|
+ label: '总重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'fixedprice',
|
|
|
+ label: '克拉单价',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'remainqty',
|
|
|
+ label: '剩余重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '委托状态',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '委托时间',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradedate',
|
|
|
+ label: '交易日',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ width: 180
|
|
|
+ }
|
|
|
+ ])
|
|
|
+
|
|
|
+ // 获取出售大厅委托单
|
|
|
+ const getSellOrderList = () => {
|
|
|
+ const param = getQueryParam()
|
|
|
+ loading.value = true
|
|
|
+ return querySellOrder({
|
|
|
+ data: {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ zscategory: param.zscategory,
|
|
|
+ wrtradeorderid: param.wrtradeorderid,
|
|
|
+ zsallproperties: param.goodsno,
|
|
|
+ buyusername: param.sellusername,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ selectList.value = [
|
|
|
+ {
|
|
|
+ label: '商品分类',
|
|
|
+ key: 'zscategory',
|
|
|
+ options: getCategoryList(),
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ inputList.value = [
|
|
|
+ { label: '单号', keys: ['wrtradeorderid'], type: 'number' },
|
|
|
+ { label: '卖方', keys: ['sellusername'] },
|
|
|
+ { label: '商品', keys: ['goodsno'] },
|
|
|
+ ]
|
|
|
+
|
|
|
+ const [reset, search] = buttonList.value
|
|
|
+ reset.onClick = () => {
|
|
|
+ resetFilter()
|
|
|
+ getSellOrderList()
|
|
|
+ }
|
|
|
+ search.onClick = getSellOrderList
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ inputList,
|
|
|
+ selectList,
|
|
|
+ buttonList,
|
|
|
+ getSellOrderList,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 我的出售
|
|
|
+ */
|
|
|
+export function useSaleOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, getQueryParam, resetFilter } = useDataTable<Ermcp.MySellOrderRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderid',
|
|
|
+ label: '委托单号',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscategorydisplay',
|
|
|
+ label: '商品分类',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'goodsno',
|
|
|
+ label: '商品编号',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'totalqty',
|
|
|
+ label: '委托重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'fixedprice',
|
|
|
+ label: '克拉单价',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'selledqty',
|
|
|
+ label: '成交重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '委托状态',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '委托时间',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+ ])
|
|
|
+
|
|
|
+ // 获取我的出售列表
|
|
|
+ const getSaleOrderList = () => {
|
|
|
+ const param = getQueryParam()
|
|
|
+ loading.value = true
|
|
|
+ return queryMySellOrder({
|
|
|
+ data: {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ userid: sessionData.getLoginInfo('UserID'),
|
|
|
+ zscategory: param.zscategory,
|
|
|
+ wrtradeorderid: param.wrtradeorderid,
|
|
|
+ zsallproperties: param.goodsno,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ selectList.value = [
|
|
|
+ {
|
|
|
+ label: '商品分类',
|
|
|
+ key: 'zscategory',
|
|
|
+ options: getCategoryList(),
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ inputList.value = [
|
|
|
+ { label: '单号', keys: ['wrtradeorderid'], type: 'number' },
|
|
|
+ { label: '商品', keys: ['goodsno'] },
|
|
|
+ ]
|
|
|
+
|
|
|
+ const [reset, search] = buttonList.value
|
|
|
+ reset.onClick = () => {
|
|
|
+ resetFilter()
|
|
|
+ getSaleOrderList()
|
|
|
+ }
|
|
|
+ search.onClick = getSaleOrderList
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ inputList,
|
|
|
+ selectList,
|
|
|
+ buttonList,
|
|
|
+ getSaleOrderList,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 我的求购
|
|
|
+ */
|
|
|
+export function usePurchaseOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, getQueryParam, resetFilter } = useDataTable<Ermcp.MyBuyOrderRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderid',
|
|
|
+ label: '委托单号',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscategorydisplay',
|
|
|
+ label: '商品分类',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zstabledisplay',
|
|
|
+ label: '求购信息',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '状态',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'validtime',
|
|
|
+ label: '有效日期',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '委托时间',
|
|
|
+ width: 180,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+ ])
|
|
|
+
|
|
|
+ // 获取我的求购列表
|
|
|
+ const getPurchaseOrderList = () => {
|
|
|
+ const param = getQueryParam()
|
|
|
+ loading.value = true
|
|
|
+ return queryMyBuyOrder({
|
|
|
+ data: {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ userid: sessionData.getLoginInfo('UserID'),
|
|
|
+ zscategory: param.zscategory,
|
|
|
+ wrtradeorderid: param.wrtradeorderid,
|
|
|
+ zsallproperties: param.zstabledisplay,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ selectList.value = [
|
|
|
+ {
|
|
|
+ label: '商品分类',
|
|
|
+ key: 'zscategory',
|
|
|
+ options: getCategoryList(),
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ inputList.value = [
|
|
|
+ { label: '单号', keys: ['wrtradeorderid'], type: 'number' },
|
|
|
+ { label: '商品', keys: ['zstabledisplay'] },
|
|
|
+ ]
|
|
|
+
|
|
|
+ const [reset, search] = buttonList.value
|
|
|
+ reset.onClick = () => {
|
|
|
+ resetFilter()
|
|
|
+ getPurchaseOrderList()
|
|
|
+ }
|
|
|
+ search.onClick = getPurchaseOrderList
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ inputList,
|
|
|
+ selectList,
|
|
|
+ buttonList,
|
|
|
+ getPurchaseOrderList,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 我的摘牌
|
|
|
+ */
|
|
|
+export function useDelistingOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, getQueryParam, resetFilter } = useDataTable<Ermcp.MyDeListingRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ {
|
|
|
+ prop: 'buyorsell',
|
|
|
+ label: '类型',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'matchusername',
|
|
|
+ label: '对手方',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zsshapetypedisplay',
|
|
|
+ label: '形状',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscolortype1display',
|
|
|
+ label: '颜色',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zsclaritytype1display',
|
|
|
+ label: '净度',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zscuttype1display',
|
|
|
+ label: '切工',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zspolishtype1display',
|
|
|
+ label: '抛光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zssymmetrytype1display',
|
|
|
+ label: '对称',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zsfluorescencetype1display',
|
|
|
+ label: '荧光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '尺寸',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qty',
|
|
|
+ label: '重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'exchangerate',
|
|
|
+ label: '汇率',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradeprice',
|
|
|
+ label: '成交价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradetime',
|
|
|
+ label: '成交时间',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+ ])
|
|
|
+
|
|
|
+ const categoryList = [
|
|
|
+ { label: '单颗裸钻', value: Category.Diamond },
|
|
|
+ { label: '单颗彩钻', value: Category.Fancy }
|
|
|
+ ]
|
|
|
+
|
|
|
+ selectList.value = [
|
|
|
+ {
|
|
|
+ label: '商品分类',
|
|
|
+ key: 'zscategory',
|
|
|
+ options: categoryList,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '方向',
|
|
|
+ key: 'buyorsell',
|
|
|
+ options: [],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+
|
|
|
+ inputList.value = [
|
|
|
+ { label: '对手方', keys: ['matchusername'] },
|
|
|
+ { label: '商品', keys: ['zscategorydisplay'] },
|
|
|
+ ]
|
|
|
+
|
|
|
+ // 获取我的摘牌列表
|
|
|
+ const getDelistingOrderList = () => {
|
|
|
+ const param = getQueryParam()
|
|
|
+ loading.value = true
|
|
|
+ return queryMyDeListing({
|
|
|
+ data: {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ userid: sessionData.getLoginInfo('UserID'),
|
|
|
+ zscategorys: param.zscategory ? param.zscategory.toString() : categoryList.map((e) => e.value).join(','),
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const [reset, search] = buttonList.value
|
|
|
+ reset.onClick = () => {
|
|
|
+ resetFilter()
|
|
|
+ getDelistingOrderList()
|
|
|
+ }
|
|
|
+ search.onClick = getDelistingOrderList
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ inputList,
|
|
|
+ selectList,
|
|
|
+ buttonList,
|
|
|
+ getDelistingOrderList,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 我的询价
|
|
|
+ */
|
|
|
+export function useInquireOrder() {
|
|
|
+ const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp>()
|
|
|
+ const loading = shallowRef(false)
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([])
|
|
|
+ const selectedBuyOrSell = shallowRef(0)
|
|
|
+ const selectedStatus = shallowRef(1)
|
|
|
+
|
|
|
+ // 询价方向
|
|
|
+ const buyOrSell = [
|
|
|
+ { label: '求购', value: 0 },
|
|
|
+ { label: '出售', value: 1 }
|
|
|
+ ]
|
|
|
+
|
|
|
+ // 询价状态
|
|
|
+ const status = [
|
|
|
+ { label: '全部', value: 0 },
|
|
|
+ { label: '待确认', value: 1 }
|
|
|
+ ]
|
|
|
+
|
|
|
+ // 获取我的询价列表
|
|
|
+ const getInquireOrderList = () => {
|
|
|
+ loading.value = true
|
|
|
+ dataList.value = []
|
|
|
+
|
|
|
+ const param: Ermcp.MyBargainApplyReq | Ermcp.MyDelistingApplyReq = {
|
|
|
+ page: pageIndex.value,
|
|
|
+ pagesize: pageSize.value,
|
|
|
+ userid: sessionData.getLoginInfo('UserID'),
|
|
|
+ }
|
|
|
+
|
|
|
+ if (selectedStatus.value) {
|
|
|
+ param.applystatus = selectedStatus.value
|
|
|
+ }
|
|
|
+
|
|
|
+ if (selectedBuyOrSell.value) {
|
|
|
+ columns.value = [
|
|
|
+ {
|
|
|
+ prop: 'buyorsell',
|
|
|
+ label: '类型',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'matchusername',
|
|
|
+ label: '对手方',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zstabledisplay',
|
|
|
+ label: '形状',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '颜色',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'validtime',
|
|
|
+ label: '净度',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '切工',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '抛光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '对称',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '荧光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '尺寸',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qty',
|
|
|
+ label: '重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'exchangerate',
|
|
|
+ label: '汇率',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradeprice',
|
|
|
+ label: '成交价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradetime',
|
|
|
+ label: '成交时间',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ return queryMyDelistingApply({
|
|
|
+ data: param,
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ columns.value = [
|
|
|
+ {
|
|
|
+ prop: 'buyorsell',
|
|
|
+ label: '类型',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'matchusername',
|
|
|
+ label: '对手方',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'zstabledisplay',
|
|
|
+ label: '形状',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'wrtradeorderstatus',
|
|
|
+ label: '颜色',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'validtime',
|
|
|
+ label: '净度',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '切工',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '抛光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '对称',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '荧光',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '尺寸',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'qty',
|
|
|
+ label: '重量',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'ordertime',
|
|
|
+ label: '价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'exchangerate',
|
|
|
+ label: '汇率',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradeprice',
|
|
|
+ label: '成交价格',
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'tradetime',
|
|
|
+ label: '成交时间',
|
|
|
+ width: 200,
|
|
|
+ show: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'operate',
|
|
|
+ label: '操作',
|
|
|
+ show: true,
|
|
|
+ fixed: 'right',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ return queryMyBargainApply({
|
|
|
+ data: param,
|
|
|
+ success: (res) => {
|
|
|
+ total.value = res.total
|
|
|
+ dataList.value = res.data
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ dataList.value = []
|
|
|
+ },
|
|
|
+ complete: () => {
|
|
|
+ loading.value = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ loading,
|
|
|
+ dataList,
|
|
|
+ total,
|
|
|
+ pageIndex,
|
|
|
+ pageSize,
|
|
|
+ columns,
|
|
|
+ buyOrSell,
|
|
|
+ status,
|
|
|
+ selectedBuyOrSell,
|
|
|
+ selectedStatus,
|
|
|
+ getInquireOrderList,
|
|
|
+ }
|
|
|
+}
|