|
|
@@ -112,15 +112,28 @@ export function useSellOrderListing(selectedRow?: Ermcp.MyWRPositionRsp) {
|
|
|
const { getUserId, getFirstAccountId } = useLoginStore()
|
|
|
const { dataList } = useDataTable<Ermcp.MyWRPositionRsp>()
|
|
|
const { zscategory, wrstandardid = 0, ladingbillid = '0', subnum = 0, ftotalqty = 0, ffreezeqty = 0 } = selectedRow ?? {}
|
|
|
-
|
|
|
const submitLoading = shallowRef(false)
|
|
|
const tableLoading = shallowRef(false)
|
|
|
- const columns = shallowRef<Ermcp.TableColumn[]>([])
|
|
|
+ const selectedCategoryId = shallowRef(zscategory ?? Category.Diamond)
|
|
|
+
|
|
|
const categoryList = [
|
|
|
{ label: '单颗裸钻', value: Category.Diamond },
|
|
|
{ label: '单颗彩钻', value: Category.Fancy }
|
|
|
]
|
|
|
- const selectedCategoryId = shallowRef(zscategory ?? Category.Diamond)
|
|
|
+
|
|
|
+ const columns = shallowRef<Ermcp.TableColumn[]>([
|
|
|
+ { prop: 'warehousenamedisplay', label: '仓库', show: true },
|
|
|
+ { prop: 'zsshapetypedisplay', label: '形状', width: 200, 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: 'sizedisplay', label: '尺寸', show: true },
|
|
|
+ { prop: 'price', label: '价格', show: true },
|
|
|
+ { prop: 'weight', label: '克拉重量', show: true },
|
|
|
+ ])
|
|
|
|
|
|
const formData = reactive<Proto.ZSSellOrderListingReq>({
|
|
|
Header: {
|
|
|
@@ -159,81 +172,6 @@ export function useSellOrderListing(selectedRow?: Ermcp.MyWRPositionRsp) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- // 切换商品分类
|
|
|
- const categoryChange = () => {
|
|
|
- switch (selectedCategoryId.value) {
|
|
|
- case Category.Diamonds: {
|
|
|
- columns.value = [
|
|
|
- { prop: 'goodsno', label: '商品编号', show: true, },
|
|
|
- { prop: 'price', label: '总价', show: true, },
|
|
|
- { prop: 'weight', label: '总重量', show: true, },
|
|
|
- { prop: 'weightavg', label: '平均单颗重量', show: true, },
|
|
|
- { prop: 'priceper', label: '克拉单位', show: true, },
|
|
|
- { prop: 'ftotalqty', label: '库存重量', show: true, },
|
|
|
- { prop: 'remainqty', label: '剩余重量', show: true, },
|
|
|
- { prop: 'zsshapetypedisplay', label: '形状', show: true, width: 200, },
|
|
|
- { prop: 'zscolortype', label: '颜色', show: true, },
|
|
|
- { prop: 'zsclaritytype', label: '净度', show: true, }
|
|
|
- ]
|
|
|
- break
|
|
|
- }
|
|
|
- case Category.Diamond: {
|
|
|
- columns.value = [
|
|
|
- { prop: 'goodsno', label: '商品编号', show: true, },
|
|
|
- { prop: 'price', label: '价格', show: true, },
|
|
|
- { prop: 'weight', label: '克拉重量', show: true, },
|
|
|
- { prop: 'priceper', label: '克拉单位', show: true, },
|
|
|
- { prop: 'zsshapetypedisplay', label: '形状', width: 200, show: true, },
|
|
|
- { prop: 'zscolortype1display', label: '颜色', show: true, },
|
|
|
- { prop: 'zsclaritytype1display', label: '净度', show: true, }
|
|
|
- ]
|
|
|
- break
|
|
|
- }
|
|
|
- case Category.Rough: {
|
|
|
- columns.value = [
|
|
|
- { prop: 'goodsno', label: '商品编号', show: true, },
|
|
|
- { prop: 'price', label: '总价', show: true, },
|
|
|
- { prop: 'weight', label: '总重量', show: true, },
|
|
|
- { prop: 'weightavg', label: '平均单颗重量', show: true, },
|
|
|
- { prop: 'priceper', label: '克拉单位', show: true, },
|
|
|
- { prop: 'ftotalqty', label: '库存重量', show: true, },
|
|
|
- { prop: 'remainqty', label: '剩余重量', show: true, },
|
|
|
- { prop: 'zscrystaltypedisplay', label: '晶型', width: 200, show: true, },
|
|
|
- { prop: 'zscolortype', label: '颜色', show: true, },
|
|
|
- { prop: 'zsclaritytype', label: '净度', show: true, }
|
|
|
- ]
|
|
|
- break
|
|
|
- }
|
|
|
- case Category.Jewelry: {
|
|
|
- columns.value = [
|
|
|
- { prop: 'goodsno', label: '商品编号', show: true, },
|
|
|
- { prop: 'price', label: '价格', show: true, },
|
|
|
- { prop: 'weight', label: '主石重量', show: true, },
|
|
|
- { prop: 'priceper', label: '克拉单位', show: true, },
|
|
|
- { prop: 'zsstyletypedisplay', label: '款式', width: 200, show: true, },
|
|
|
- { prop: 'zsstyletypedisplay', label: '主石形状', width: 200, show: true, },
|
|
|
- { prop: 'zsclaritytype1display', label: '主石净度', show: true, },
|
|
|
- { prop: 'zscuttype1display', label: '主石切工', show: true, },
|
|
|
- { prop: 'zssymmetrytype1display', label: '主石对称度', show: true, }
|
|
|
- ]
|
|
|
- break
|
|
|
- }
|
|
|
- case Category.Fancy: {
|
|
|
- columns.value = [
|
|
|
- { prop: 'goodsno', label: '商品编号', show: true, },
|
|
|
- { prop: 'price', label: '价格', show: true, },
|
|
|
- { prop: 'weight', label: '克拉重量', show: true, },
|
|
|
- { prop: 'priceper', label: '克拉单位', show: true, },
|
|
|
- { prop: 'zsshapetypedisplay', label: '形状', width: 200, show: true, },
|
|
|
- { prop: 'zsczcolortype', label: '颜色', width: 200, show: true, },
|
|
|
- { prop: 'zsclaritytype1display', label: '净度', show: true, }
|
|
|
- ]
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- getDiamondList()
|
|
|
- }
|
|
|
-
|
|
|
const formSubmit = () => {
|
|
|
submitLoading.value = true
|
|
|
return zsSellOrderListing({
|
|
|
@@ -256,7 +194,7 @@ export function useSellOrderListing(selectedRow?: Ermcp.MyWRPositionRsp) {
|
|
|
columns,
|
|
|
categoryList,
|
|
|
selectedCategoryId,
|
|
|
- categoryChange,
|
|
|
+ getDiamondList,
|
|
|
formSubmit,
|
|
|
}
|
|
|
}
|