feat: 加入表格行移动,重写Base

This commit is contained in:
cyonjan 2025-07-27 00:56:01 +08:00
parent b580b42949
commit 92e16099b4
5 changed files with 244 additions and 230 deletions

7
package-lock.json generated
View File

@ -14,6 +14,7 @@
"element-plus": "^2.9.9",
"pinia": "^3.0.2",
"pinia-plugin-persistedstate": "^4.2.0",
"sortablejs": "^1.15.6",
"vue": "^3.5.13",
"vue-router": "^4.5.1",
"xlsx": "^0.18.5",
@ -4139,6 +4140,12 @@
"node": ">=18"
}
},
"node_modules/sortablejs": {
"version": "1.15.6",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.6.tgz",
"integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==",
"license": "MIT"
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",

View File

@ -15,6 +15,7 @@
"element-plus": "^2.9.9",
"pinia": "^3.0.2",
"pinia-plugin-persistedstate": "^4.2.0",
"sortablejs": "^1.15.6",
"vue": "^3.5.13",
"vue-router": "^4.5.1",
"xlsx": "^0.18.5",

View File

@ -91,38 +91,40 @@
:cell-style="{borderColor: 'black'}"
style="border: 1px solid black;"
size="small"
row-key="id"
border
@row-click="handleRowEdit"
>
<el-table-column fixed label="#" type="index" width="50" align="center" header-align="center" />
<el-table-column fixed label="#" type="index" width="50" align="center" header-align="center">
<template #default="{ $index }">
<div class="allowDrag cursor-move" v-if="editable">
<span>{{ $index + 1 }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="b_name" label="品牌" header-align="center" align="left" width="120">
<template #default="{row,$index}">
<BrandPicker v-if="lastRow($index)" v-model="row.brand_info" class="inline-input w-full" size="small" :width="100" />
<el-text v-else size="small">{{ row.b_name }}</el-text>
<el-text size="small">{{ row.b_name }}</el-text>
</template>
</el-table-column>
<el-table-column prop="code" label="件号" width="120" show-overflow-tooltip header-align="center">
<template #default="{row,$index}">
<ProductPicker v-if="lastRow($index)" v-model="row.code" class="inline-input w-full" size="small" :width="100" @selected="handleProductSelect" />
<el-text v-else size="small" tag="b">{{ row.code }}</el-text>
<el-text size="small" tag="b">{{ row.code }}</el-text>
</template>
</el-table-column>
<el-table-column prop="new_code" label="更新件号" header-align="center" width="110" show-overflow-tooltip>
<template #default="{row,$index}">
<el-input v-if="lastRow($index)" v-model="row.new_code" class="inline-input w-full" size="small" />
<el-text v-else size="small">{{ row.new_code }}</el-text>
<el-text size="small">{{ row.new_code }}</el-text>
</template>
</el-table-column>
<el-table-column label="名称" width="140" show-overflow-tooltip header-align="center">
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.name" class="inline-input w-full" size="small" />
<el-text v-else size="small">{{ scope.row.name }}</el-text>
<el-text size="small">{{ scope.row.name }}</el-text>
</template>
</el-table-column>
<el-table-column prop="price" label="面价" header-align="center" align="right" width="110">
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.price" class="inline-input w-full" size="small" />
<el-text v-else size="small" tag="b" type="primary">{{ (+scope.row.price).toFixed(2) }}</el-text>
<el-text size="small" tag="b" type="primary">{{ (+scope.row.price).toFixed(2) }}</el-text>
</template>
</el-table-column>
<el-table-column prop="add_time" label="价格版本" header-align="center" align="center" width="110" show-overflow-tooltip>
@ -132,32 +134,27 @@
</el-table-column>
<el-table-column prop="sell_price" label="预估价" header-align="center" align="right" width="110">
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.sell_price" class="inline-input w-full" size="small" />
<el-text v-else size="small" tag="b" type="success">{{ (+scope.row.sell_price).toFixed(2) }}</el-text>
<el-text size="small" tag="b" type="success">{{ (+scope.row.sell_price).toFixed(2) }}</el-text>
</template>
</el-table-column>
<el-table-column prop="weight" label="重量" header-align="center" align="right" width="80">
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.weight" class="inline-input w-full" size="small" />
<el-text v-else size="small">{{ scope.row.weight }}</el-text>
<el-text size="small">{{ scope.row.weight }}</el-text>
</template>
</el-table-column>
<el-table-column prop="volume" label="体积" header-align="center" align="right" width="80">
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.volumn" class="inline-input w-full" size="small" />
<el-text v-else size="small">{{ scope.row.volumn }}</el-text>
<el-text size="small">{{ scope.row.volumn }}</el-text>
</template>
</el-table-column>
<el-table-column prop="amount" label="数量" width="60" header-align="center" align="center">
<template #default="scope">
<el-input type="number" v-if="lastRow(scope.$index)" v-model="scope.row.amount" class="inline-input w-full" size="small" />
<el-text v-else size="small" tag="b">{{ scope.row.amount }}</el-text>
<el-text size="small" tag="b">{{ scope.row.amount }}</el-text>
</template>
</el-table-column>
<el-table-column prop="note" label="备注" header-align="center" width="140" show-overflow-tooltip>
<template #default="scope">
<el-input v-if="lastRow(scope.$index)" v-model="scope.row.note" class="inline-input w-full" size="small" />
<el-text v-else size="small">{{ scope.row.note }}</el-text>
<el-text size="small">{{ scope.row.note }}</el-text>
</template>
</el-table-column>
<el-table-column prop="seller" label="商品来源" width="100" show-overflow-tooltip header-align="center" align="center">
@ -197,68 +194,131 @@
</span>
</template>
</el-table-column>
<el-table-column label="" header-align="center" align="center" width="360" v-if="editable">
<el-table-column label="" header-align="center" align="center" width="260">
<template #default="scope">
<div v-if="lastRow(scope.$index)">
<el-button
size="small"
type="primary"
:icon="Plus"
@click.stop="submit_product"
/>
<el-button
size="small"
type="danger"
:icon="Delete"
@click.stop="clearInput"
/>
</div>
<div v-else>
<el-button
size="small"
type="primary"
:disabled="scope.$index==0"
:icon="ArrowUpBold"
@click.stop="moveUp(scope.$index,scope.row)"
/>
<el-button
size="small"
type="primary"
:disabled="editable ? (scope.$index==(goodsList.length-2) ? true : false) : (scope.$index==(goodsList.length-1) ? true : false)"
:icon="ArrowDownBold"
@click.stop="moveDown(scope.$index,scope.row)"
/>
<el-button
size="small"
type="danger"
:icon="Delete"
@click.stop="()=>goodsList.splice(scope.$index,1)"
/>
<el-button
size="small"
:type="scope.row.focus ? 'danger' : 'success'"
:disabled="scope.row.focus"
@click.stop="setFocusItem(scope.row,scope.$index)"
>
<el-icon color="#FFF">
<FocusIn />
</el-icon>
</el-button>
<el-button
size="small"
type="primary"
:icon="Refresh"
@click.stop="reloadRow(scope.$index)"
/>
<el-button
size="small"
type="info"
:disabled="!`${scope.row.id}`.startsWith('0-')"
@click.stop="() => {}"
>
<el-icon><Camera /></el-icon>
</el-button>
</div>
<el-button
size="small"
type="danger"
:icon="Delete"
@click.stop="()=>goodsList.splice(scope.$index,1)"
/>
<el-button
size="small"
:type="scope.row.focus ? 'danger' : 'success'"
:disabled="scope.row.focus"
@click.stop="setFocusItem(scope.row,scope.$index)"
>
<el-icon color="#FFF">
<FocusIn />
</el-icon>
</el-button>
<el-button
size="small"
type="primary"
:icon="Refresh"
@click.stop="reloadRow(scope.$index)"
/>
<el-button
size="small"
type="info"
:disabled="!`${scope.row.id}`.startsWith('0-')"
@click.stop="() => {}"
>
<el-icon><Camera /></el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="flex w-full justify-center items-center mt-2px">
<el-table
v-if="editable"
fit
:data="edit_data"
class="text-xs w-auto"
:header-cell-style="{background: '#e0f2fe', color: 'black',borderColor: 'black'}"
:cell-style="{borderColor: 'black'}"
style="border: 1px solid black;"
size="small"
:show-header="false"
border
>
<el-table-column fixed label="#" type="index" width="50" align="center" header-align="center">
<template #default="{row}">
<span></span>
</template>
</el-table-column>
<el-table-column prop="b_name" label="品牌" header-align="center" align="left" width="120">
<template #default="{row}">
<BrandPicker v-model="row.brand_info" class="inline-input w-full" size="small" :width="100" />
</template>
</el-table-column>
<el-table-column prop="code" label="件号" width="120" header-align="center">
<template #default="{row}">
<ProductPicker v-model="row.code" class="inline-input w-full" size="small" :width="100" @selected="handleProductSelect" />
</template>
</el-table-column>
<el-table-column prop="new_code" label="更新件号" header-align="center" width="110">
<template #default="{row}">
<el-input v-model="row.new_code" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column label="名称" width="140" header-align="center">
<template #default="{row}">
<el-input v-model="row.name" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="price" label="面价" header-align="center" align="right" width="110">
<template #default="{row}">
<el-input v-model="row.price" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="add_time" label="价格版本" header-align="center" align="center" width="110">
<template #default="{row}">
<el-text size="small" tag="b" type="danger">{{ row.add_time }}</el-text>
</template>
</el-table-column>
<el-table-column prop="sell_price" label="预估价" header-align="center" align="right" width="110">
<template #default="{row}">
<el-input v-model="row.sell_price" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="weight" label="重量" header-align="center" align="right" width="80">
<template #default="{row}">
<el-input v-model="row.weight" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="volume" label="体积" header-align="center" align="right" width="80">
<template #default="{row}">
<el-input v-model="row.volumn" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="amount" label="数量" width="60" header-align="center" align="center">
<template #default="{row}">
<el-input type="number" v-model="row.amount" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column prop="note" label="备注" header-align="center" width="140">
<template #default="{row}">
<el-input v-model="row.note" class="inline-input w-full" size="small" />
</template>
</el-table-column>
<el-table-column label="商品来源" prop="seller" width="100" header-align="center" align="center"/>
<el-table-column label="" header-align="center" align="center" width="260">
<template #default="{row}">
<el-button
size="small"
type="primary"
:icon="Plus"
@click.stop="submit_product"
/>
<el-button
size="small"
type="danger"
:icon="Delete"
@click.stop="clearInput"
/>
</template>
</el-table-column>
</el-table>
@ -275,7 +335,7 @@
<el-card class="box-card-edit">
<el-form :inline="true">
<el-form-item label="产品编码">
<el-input v-model.trim="new_product.code" placeholder="产品编码" readonly />
<el-input v-model.trim="new_product.code" placeholder="产品编码" />
</el-form-item>
<el-form-item label="更新件号">
<el-input v-model.trim="new_product.new_code" placeholder="更新件号" />
@ -358,6 +418,7 @@
import BrandPicker from '@/components/BrandPicker.vue'
import ProductPicker from '@/components/ProductPicker.vue'
import { useUserStore } from '@/store'
import Sortable from "sortablejs";
const user_store = useUserStore()
const order_id = ref(0)
@ -420,25 +481,7 @@
const { data:rb } = await hasSupplyInquiry(order_id.value)
has_supply_inquiry.value = +rb.data > 0
}
if(editable.value) {
goodsList.value.push({
brand_info: {id: 0,name: ''},
code: '',
new_code: '',
name: '',
b_name: '',
brand: 0,
price: 0,
sell_price: 0,
weight: 0.000,
volumn: 0.000,
amount: 1,
type: 'other',
seller: '待定',
seller_id: 0,
note: ''
})
}
setSort()
}
onMounted(async() => {
@ -447,6 +490,7 @@
if(order_id.value != 0) {
await load()
}
setSort()
})
const goods_change = computed(() => {
@ -457,8 +501,6 @@
return order_status.value == 0 && !has_supply_inquiry.value
})
const lastRow = computed(() => (idx) => order_status.value == 0 && !has_supply_inquiry.value && goodsList.value.length == (idx + 1))
const customer_search = ref('')
const enableCustomerEdit = ref(false)
const handleCustomerEdit = () => {
@ -535,24 +577,7 @@
order_note.value = order.data.note
order_subject.value = order.data.subject
goodsList.value = []
goodsList.value.push({
id: 0,
brand_info: {id: 0,name: ''},
code: '',
new_code: '',
name: '',
b_name: '',
brand: 0,
price: 0,
sell_price: 0,
weight: 0.000,
volumn: 0.000,
amount: 1,
type: 'other',
seller: '待定',
seller_id: 0,
note: ''
})
setSort()
goodsHash.value = md5(JSON.stringify([]))
const { data:member } = await memberInfo(+order.data.user_id)
if(member.data.id) {
@ -609,26 +634,25 @@
}
}
// const baseItem = {
// brand_info: {id: 0,name: ''},
// code: '',
// new_code: '',
// name: '',
// b_name: '',
// brand: 0,
// price: 0,
// sell_price: 0,
// weight: 0.000,
// volumn: 0.000,
// amount: 1,
// type: 'other',
// seller: '',
// seller_id: 0,
// note: ''
// }
// const brandInfo = ref({})
// const product_code = ref('')
// const edit_data = ref(baseItem)
const baseItem = {
id: 0,
brand_info: {id: 0,name: ''},
code: '',
short_code: '',
new_code: '',
name: '',
b_name: '',
brand: 0,
price: 0,
sell_price: 0,
weight: 0.000,
volumn: 0.000,
amount: 1,
type: 'other',
seller: '待定',
seller_id: 0,
note: '',
}
let new_product = reactive({
id: 0,
@ -645,14 +669,15 @@
add_time: '',
})
const edit_data = ref([Object.assign({},baseItem)])
const edit_row = ref(0)
const centerDialogVisible = ref(false)
const handleRowEdit = (row,column,evt) => {
if(order_status.value > 0) {
return
}
let idx = goodsList.value.filter((_,i) => i < goodsList.value.length - 1).findIndex((item) => item.id == row.id && item.code == row.code)
if(idx <= -1) {
let idx = goodsList.value.findIndex((item) => item.id == row.id && item.code == row.code)
if(idx < 0) {
return
}
edit_row.value = idx
@ -694,7 +719,7 @@
weight,
volume,
type: 'product',
amount: parseInt(new_product.amount) ? parseInt(new_product.amount) : 1,
amount: parseInt(new_product.amount) ? +new_product.amount : 1,
note: new_product.note,
seller: '预订产品',
seller_id: 0,
@ -706,33 +731,6 @@
if(new_product.sell_price > 0 && new_product.sell_price != product_data.sell_price) {
product_data.sell_price = new_product.sell_price
}
// if(goodsList.value[edit_row.value].id == product_data.id) {
// Object.assign(goodsList.value[edit_row.value],product_data)
// } else {
// let idx = goodsList.value.findIndex(item => item.id == product_data.id)
// if(idx < 0) {
// Object.assign(goodsList.value[edit_row.value],product_data)
// } else {
// MessageBox.confirm('', '',{
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// }).then(() => {
// goodsList.value[idx]['amount'] += +product_data.amount
// goodsList.value.splice(edit_row.value,1)
// ElMessage({
// message: '!',
// type: 'success',
// })
// })
// .catch(() => {
// ElMessage({
// message: '',
// type: 'info',
// })
// })
// }
// }
} else {
const {code,name,brand_info,price,sell_price,amount,note} = new_product
product_data = {
@ -746,9 +744,9 @@
price,
sell_price,
weight: 0.000,
volume: 0.000,
volumn: 0.000,
type:'other',
amount: parseInt(amount) ? parseInt(amount) : 1,
amount: parseInt(amount) ? +amount : 1,
note,
seller: '待定',
seller_id: 0
@ -781,13 +779,13 @@
})
}
}
// Object.assign(goodsList.value[edit_row.value],add_data)
setSort()
centerDialogVisible.value = false
}
const submit_product = async () => {
let row = goodsList.value[goodsList.value.length-1]
if(row.brand_info.id && row.brand != row.brand_info.id) {
let row = edit_data.value[0]
if(row.brand_info?.id && row.brand != row.brand_info?.id) {
row.brand = row.brand_info.id
row.b_name = row.brand_info.name
}
@ -819,6 +817,10 @@
if(data.data && data.data.bid) {
const {bid:id,code,short_code,cn_name,en_name,brand,b_name,price,dealer_price,order_price: sell_price,weight,volume,add_time} = data.data
let product_data = {
brand_info: {
id: brand,
name: b_name
},
id,
name: cn_name ? cn_name : en_name,
code,
@ -836,27 +838,28 @@
seller_id: 0,
add_time
}
goodsList.value[goodsList.value.length-1] = Object.assign(goodsList.value[goodsList.value.length-1],product_data)
edit_data.value[0] = Object.assign({},product_data)
}
}
}
const pushRow = (row) => {
if(row.type != 'other') {
let index = goodsList.value.filter((_,idx) => idx < goodsList.value.length-1).findIndex(item => item.id == row.id && item.type == row.type)
let index = goodsList.value.findIndex(item => item.id == row.id && item.type == row.type)
if(index != -1) {
goodsList.value[index]['amount'] += row['amount']
goodsList.value[index]['amount'] += +row['amount']
} else {
goodsList.value.splice(goodsList.value.length-1,0,row)
goodsList.value.push(row)
}
} else {
let index = goodsList.value.filter((_,idx) => idx < goodsList.value.length-1).findIndex(item => item.code == row.code && item.brand == row.brand && item.type == 'other')
let index = goodsList.value.findIndex(item => item.code == row.code && item.brand == row.brand && item.type == 'other')
if(index != -1) {
goodsList.value[index]['amount'] += row['amount']
goodsList.value[index]['amount'] += +row['amount']
} else {
goodsList.value.splice(goodsList.value.length-1,0,row)
goodsList.value.push(row)
}
}
setSort()
}
const reloadData = async (item) => {
@ -876,7 +879,7 @@
weight,
volume,
type: 'product',
amount: parseInt(item.amount) ? parseInt(item.amount) : 1,
amount: parseInt(item.amount) ? +item.amount : 1,
note: item.note,
seller: '预订产品',
seller_id: 0,
@ -897,6 +900,7 @@
const reloadRow = async (idx) => {
let item = goodsList.value[idx]
Object.assign(goodsList.value[idx],await reloadData(item))
setSort()
}
const refresh = async () => {
@ -907,55 +911,23 @@
}
let data_arr = goods_data.map(item => ({brand: item.brand,code: item.code}))
const { data:res } = await hasFocusBatch(data_arr)
for(let item of res.data) {
let idx = res.data.findIndex(it => it.brand == item.brand && it.code == item.code)
res.data[idx].focus = item.has_focus
}
goodsList.value.forEach((item,idx) => {
Object.assign(item,goods_data[idx])
})
// for(let item of res.data) {
// let idx = goods_data.findIndex(it => it.brand == item.brand && it.code == item.code)
// goods_data[idx].focus = item.has_focus
// }
// let goods_hash = md5(JSON.stringify(goods_data))
// if(goodsHash.value != goods_hash) {
// goodsList.value = goods_data
// }
setSort()
loading.value = false
}
const clearInput = () => {
goodsList.value[goodsList.value.length-1] = {
id: 0,
brand_info: {id: 0,name: ''},
code: '',
new_code: '',
name: '',
b_name: '',
brand: 0,
price: 0,
sell_price: 0,
weight: 0.000,
volumn: 0.000,
amount: 1,
type: 'other',
seller: '待定',
seller_id: 0,
note: ''
}
}
const moveUp = (index,row) => {
goodsList.value.splice(index-1,0,row)
goodsList.value.splice(index+1,1)
}
const moveDown = (index,row) => {
goodsList.value.splice(index,1)
goodsList.value.splice(index+1,0,row)
}
const clearInput = () => edit_data.value = [Object.assign({}, baseItem)]
const saveGoods = async () => {
await addInquiryGoods(order_id.value,goodsList.value.slice(0,-1))
await addInquiryGoods(order_id.value,goodsList.value)
await addLog(props.orderId,`${user_store.userName}(${user_store.userId})`,'修改商品',JSON.stringify(goodsList.value))
goodsHash.value = md5(JSON.stringify(goodsList.value.slice(0,-1)))
goodsHash.value = md5(JSON.stringify(goodsList.value))
ElMessage({
message: "成功修改订单商品!",
type: 'success',
@ -1066,6 +1038,38 @@
focusInfo.value.new_code = null
focusDialogVisible.value = true
}
//
const goodsTableRef = ref(null);
let sortableInstance = null;
function setSort() {
nextTick(() => {
const tbody = goodsTableRef.value?.$el.querySelector(".el-table__body-wrapper tbody");
if (!tbody) {
console.warn("tbody 不存在,拖拽初始化失败");
return;
}
//
if (sortableInstance) {
sortableInstance.destroy();
}
//
sortableInstance = Sortable.create(tbody, {
handle: ".allowDrag", //
animation: 150,
onEnd: (evt) => {
const movedItem = goodsList.value.splice(evt.oldIndex, 1)[0];
goodsList.value.splice(evt.newIndex, 0, movedItem);
},
});
});
}
// function handleSort() {
// if (sortableInstance) {
// sortableInstance.sort(goodsList.value.map(f => f.id));
// }
// }
</script>
<style lang='scss' scoped>

View File

@ -32,6 +32,7 @@
</div>
<div class="flex justify-center mt-2">
<el-table
ref="returnTableRef"
size="small"
fit
:data="row.return_data"
@ -49,7 +50,7 @@
<el-table-column prop="market" label="牌价面价" show-overflow-tooltip width="100" align="right" header-align="center">
<template #default="{row}">
<el-text type="primary" tag="b" size="small">
{{ productMmarket(row.id).toFixed(2) }}
{{ productMarket(row.id).toFixed(2) }}
</el-text>
</template>
</el-table-column>
@ -61,7 +62,7 @@
</el-table-column>
<el-table-column prop="price" label="报价" show-overflow-tooltip width="100" align="right" header-align="center">
<template #default="{row}">
<el-text size="small" :type="row.market!=0 && row.price>(productMmarket(row.id)*0.45) && row.price<=productMmarket(row.id) ? 'info' : 'danger'" tag="b">
<el-text size="small" :type="row.market!=0 && row.price>(productMarket(row.id)*0.45) && row.price<=productMarket(row.id) ? 'info' : 'danger'" tag="b">
{{ (Math.round(row.price * 100) / 100.00).toFixed(2) }}
</el-text>
</template>
@ -336,7 +337,7 @@
</template>
<script setup>
import { ref,reactive,computed,onMounted } from 'vue'
import { ref,reactive,computed,nextTick,onMounted } from 'vue'
import { brandList,searchSupplier,addLog,getSupplierContact } from '@/api'
import { supplyInquiry,supplierFile,inquiryGoodsList,info,addSupplyInquiry,removeSupplyInquiry,checkSupplyInquiry,sendLink,inquiryProducts } from '@/api/inquiry'
import { Message,Delete,InfoFilled,Check,DocumentCopy,View,RefreshRight,Download,Upload,CloseBold,Avatar,Promotion,ChatDotRound,Link,Hide,DArrowLeft } from '@element-plus/icons-vue'
@ -365,6 +366,7 @@
const inquiryList = ref([])
const orderStatus = ref(0)
const order_id = ref(0)
const returnTableRef = ref(null)
onMounted(async () => {
const { data:bres } = await brandList()
@ -497,7 +499,7 @@
return 0.00
}
const productMmarket = computed(() => (id) => {
const productMarket = computed(() => (id) => {
const product = goodsList.value.find(item => item.id == id)
if(product) {
return +product.price

View File

@ -99,7 +99,7 @@
:content="`${row.id}`"
placement="top-start"
>
<el-text size="small">{{ dayjs(row.created_at).format('YY-MM-DD HH:mm') }}</el-text>
<el-text size="small">{{ dayjs(row.create_time).format('YY-MM-DD HH:mm') }}</el-text>
</el-tooltip>
</template>
</el-table-column>