Merge branch 'dwb' of https://e.coding.net/g-cphe0354/cashier/cashier-web
This commit is contained in:
commit
0cb12ccc5a
|
|
@ -207,9 +207,11 @@ function handleShowInput(prop: string) {
|
||||||
inputTagMap[prop].inputRef.focus();
|
inputTagMap[prop].inputRef.focus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function setQueryParams(data: object) {
|
||||||
|
queryParams.orderNo = data.orderNo
|
||||||
|
}
|
||||||
// 暴露的属性和方法
|
// 暴露的属性和方法
|
||||||
defineExpose({ getQueryParams, toggleVisible });
|
defineExpose({ getQueryParams, toggleVisible, setQueryParams });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,12 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<page-search
|
<page-search ref="searchRef" :search-config="searchConfig" @query-click="handleQueryClick"
|
||||||
ref="searchRef"
|
@reset-click="handleResetClick" />
|
||||||
:search-config="searchConfig"
|
|
||||||
@query-click="handleQueryClick"
|
|
||||||
@reset-click="handleResetClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<page-content
|
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
|
||||||
ref="contentRef"
|
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
|
||||||
:content-config="contentConfig"
|
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
|
||||||
@add-click="handleAddClick"
|
|
||||||
@edit-click="handleEditClick"
|
|
||||||
@export-click="handleExportClick"
|
|
||||||
@search-click="handleSearchClick"
|
|
||||||
@toolbar-click="handleToolbarClick"
|
|
||||||
@operat-click="handleOperatClick"
|
|
||||||
@filter-change="handleFilterChange"
|
|
||||||
>
|
|
||||||
<template #originAmount="scope">
|
<template #originAmount="scope">
|
||||||
{{ returnOriginAmount(scope.row) }}
|
{{ returnOriginAmount(scope.row) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -64,21 +52,13 @@
|
||||||
</template>
|
</template>
|
||||||
<template #mobile="scope">
|
<template #mobile="scope">
|
||||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||||
<copy-button
|
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||||
v-if="scope.row[scope.prop]"
|
|
||||||
:text="scope.row[scope.prop]"
|
|
||||||
style="margin-left: 2px"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template #operate="scope">
|
<template #operate="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-button @click="showdetail(scope.row)" link>详情</el-button>
|
<el-button @click="showdetail(scope.row)" link>详情</el-button>
|
||||||
<el-button link v-if="scope.row.status == 'done'">开票</el-button>
|
<el-button link v-if="scope.row.status == 'done'">开票</el-button>
|
||||||
<el-button
|
<el-button v-if="scope.row.status == 'unpaid'" @click="toPayOrder(scope.row)" type="primary">
|
||||||
v-if="scope.row.status == 'unpaid'"
|
|
||||||
@click="toPayOrder(scope.row)"
|
|
||||||
type="primary"
|
|
||||||
>
|
|
||||||
结账
|
结账
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -94,11 +74,7 @@
|
||||||
</page-modal>
|
</page-modal>
|
||||||
|
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<page-modal
|
<page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick">
|
||||||
ref="editModalRef"
|
|
||||||
:modal-config="editModalConfig"
|
|
||||||
@submit-click="handleSubmitClick"
|
|
||||||
>
|
|
||||||
<template #url="scope">
|
<template #url="scope">
|
||||||
<FileUpload v-model="scope.formData[scope.prop]" :limit="1" v-bind="scope.attrs" />
|
<FileUpload v-model="scope.formData[scope.prop]" :limit="1" v-bind="scope.attrs" />
|
||||||
<!-- <Dict v-model="scope.formData[scope.prop]" code="gender" v-bind="scope.attrs" /> -->
|
<!-- <Dict v-model="scope.formData[scope.prop]" code="gender" v-bind="scope.attrs" /> -->
|
||||||
|
|
@ -151,6 +127,11 @@ function returnOriginAmount(order: OrderInfoVo) {
|
||||||
});
|
});
|
||||||
return amount.toFixed(2);
|
return amount.toFixed(2);
|
||||||
}
|
}
|
||||||
|
const routeto = useRoute();
|
||||||
|
onMounted(() => {
|
||||||
|
handleQueryClick({ orderNo: routeto.query.orderNo })
|
||||||
|
searchRef.value?.setQueryParams({ orderNo: routeto.query.orderNo })
|
||||||
|
})
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
async function handleAddClick() {
|
async function handleAddClick() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@
|
||||||
<el-table-column prop="afterNumber" align="center" label="变动后库存" />
|
<el-table-column prop="afterNumber" align="center" label="变动后库存" />
|
||||||
<el-table-column prop="beforeNumber" align="center" label="原库存" />
|
<el-table-column prop="beforeNumber" align="center" label="原库存" />
|
||||||
<el-table-column prop="inOutNumber" align="center" label="销量" />
|
<el-table-column prop="inOutNumber" align="center" label="销量" />
|
||||||
<el-table-column prop="orderId" align="center" label="订单编号">
|
<el-table-column prop="orderNo" align="center" label="订单编号">
|
||||||
|
<template #default="scope">
|
||||||
|
<span style="color: #4080ff;cursor: pointer;" @click="orderNoGoUrl(scope.row.orderNo)">{{ scope.row.orderNo
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createUserName" align="center" label="操作人" />
|
<el-table-column prop="createUserName" align="center" label="操作人" />
|
||||||
<el-table-column prop="remark" align="center" label="备注" />
|
<el-table-column prop="remark" align="center" label="备注" />
|
||||||
|
|
@ -15,20 +19,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
const router = useRouter();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
function fliterinOutItem(d) {
|
function orderNoGoUrl(value) {
|
||||||
// manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库 damage-out:损耗出库
|
router.push({ name: 'orderIndex', query: { orderNo: value } });
|
||||||
if (d == 'manual-in') return '手动入库'
|
|
||||||
else if (d == 'manual-out') return '手动出库'
|
|
||||||
else if (d == 'win-in') return '盘盈入库'
|
|
||||||
else if (d == 'loss-out') return '盘亏出库'
|
|
||||||
else if (d == 'order-in') return '订单退款入库'
|
|
||||||
else if (d == 'order-out') return '订单消费出库'
|
|
||||||
else if (d == 'damage-out') return '损耗出库'
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@
|
||||||
<el-table-column prop="afterNumber" align="center" label="变动后库存" />
|
<el-table-column prop="afterNumber" align="center" label="变动后库存" />
|
||||||
<el-table-column prop="beforeNumber" align="center" label="原库存" />
|
<el-table-column prop="beforeNumber" align="center" label="原库存" />
|
||||||
<el-table-column prop="inOutNumber" align="center" label="变动数量" />
|
<el-table-column prop="inOutNumber" align="center" label="变动数量" />
|
||||||
<el-table-column prop="orderId" align="center" label="订单编号">
|
<el-table-column prop="orderNo" align="center" label="订单编号">
|
||||||
|
<template #default="scope">
|
||||||
|
<span style="color: #4080ff;cursor: pointer;" @click="orderNoGoUrl(scope.row.orderNo)">{{ scope.row.orderNo
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createUserName" align="center" label="操作人" />
|
<el-table-column prop="createUserName" align="center" label="操作人" />
|
||||||
<el-table-column prop="remark" align="center" label="备注" />
|
<el-table-column prop="remark" align="center" label="备注" />
|
||||||
|
|
@ -15,20 +19,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
const router = useRouter();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
function fliterinOutItem(d) {
|
function orderNoGoUrl(value) {
|
||||||
// manual-in:手动入库 manual-out:手动出库 win-in:盘盈入库 loss-out:盘亏出库 order-in:订单退款入库 order-out:订单消费出库 damage-out:损耗出库
|
router.push({ name: 'orderIndex', query: { orderNo: value } });
|
||||||
if (d == 'manual-in') return '手动入库'
|
|
||||||
else if (d == 'manual-out') return '手动出库'
|
|
||||||
else if (d == 'win-in') return '盘盈入库'
|
|
||||||
else if (d == 'loss-out') return '盘亏出库'
|
|
||||||
else if (d == 'order-in') return '订单退款入库'
|
|
||||||
else if (d == 'order-out') return '订单消费出库'
|
|
||||||
else if (d == 'damage-out') return '损耗出库'
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue