优化代码

This commit is contained in:
duan
2024-06-26 11:11:59 +08:00
parent 14bf3f4ac8
commit ac96e0f3e0
4 changed files with 23 additions and 7 deletions

View File

@@ -3,9 +3,9 @@ ENV = 'development'
# 接口地址 # 接口地址
# VUE_APP_BASE_API = 'http://192.168.2.17:8000' # VUE_APP_BASE_API = 'http://192.168.2.17:8000'
# VUE_APP_BASE_API = 'http://192.168.2.42:8000' # VUE_APP_BASE_API = 'http://192.168.2.42:8000'
# VUE_APP_BASE_API = 'http://192.168.2.133:8000' VUE_APP_BASE_API = 'http://192.168.2.147:8000'
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' # VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn' # VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
# VUE_APP_BASE_API = 'http://192.168.2.96:8000' # VUE_APP_BASE_API = 'http://192.168.2.96:8000'
VUE_APP_WS_API = 'ws://192.168.2.128:8000' VUE_APP_WS_API = 'ws://192.168.2.128:8000'

View File

@@ -54,11 +54,12 @@ export function tbProductStockDetailSum(params) {
*/ */
export function tbShopPurveyorGet(params) { export function tbShopPurveyorGet(params) {
return request({ return request({
url: `/api/tbShopPurveyor`, url: `/api/tbProduct/admin`,
method: "get", method: "get",
params params
}); });
} }
// 供应商列表1 // 供应商列表1
export function tbShopPurveyorGets(params) { export function tbShopPurveyorGets(params) {
return request({ return request({

View File

@@ -30,6 +30,19 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格">
<template v-slot="scope">
{{ scope.row.typeEnum }}
</template>
</el-table-column> <el-table-column label="是否售罄">
<template v-slot="scope">
{{ scope.row.isPauseSale == 1?'':'' }}
</template>
</el-table-column> <el-table-column label="是否分销">
<template v-slot="scope">
{{ scope.row.isDistribute == 1?'':'' }}
</template>
</el-table-column>
<el-table-column label="售价"> <el-table-column label="售价">
<template v-slot="scope"> <template v-slot="scope">
{{ scope.row.lowPrice }} {{ scope.row.lowPrice }}
@@ -40,7 +53,7 @@
{{ scope.row.realSalesNumber }}/{{ scope.row.stockNumber }} {{ scope.row.realSalesNumber }}/{{ scope.row.stockNumber }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分类" prop="categoryName"></el-table-column> <el-table-column label="分类名称" prop="categoryName"></el-table-column>
</el-table> </el-table>
</div> </div>
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size" <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"

View File

@@ -89,8 +89,8 @@
</el-table-column> </el-table-column>
<el-table-column label="进价"> <el-table-column label="进价">
<template v-slot="scope"> <template v-slot="scope">
<!-- <el-input-number v-model="scope.row.guidePrice" :min="0" controls-position="right" <el-input-number v-model="scope.row.guidePrice" :min="0" controls-position="right"
@change="e => scope.row.totalAmount = e * scope.row.number"></el-input-number> --> @change="e => { scope.row.costPrice = e }"></el-input-number>
<div class="tips">成本价{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div> <div class="tips">成本价{{ scope.row.costPrice }}/{{ scope.row.unitName }}</div>
</template> </template>
</el-table-column> </el-table-column>
@@ -178,7 +178,7 @@ export default {
purveyorId: [ purveyorId: [
{ {
required: true, required: true,
message: ' ', message: '请选择供应商',
trigger: 'change' trigger: 'change'
} }
], ],
@@ -202,6 +202,7 @@ export default {
this.tbShopPurveyorGet() this.tbShopPurveyorGet()
}, },
methods: { methods: {
// 提交 // 提交
submitHandle() { submitHandle() {
this.$refs.queryForm.validate(async valid => { this.$refs.queryForm.validate(async valid => {
@@ -209,6 +210,7 @@ export default {
try { try {
this.queryFormLoading = true this.queryFormLoading = true
this.queryForm.list = this.tableData.list this.queryForm.list = this.tableData.list
console.log(this.queryForm,'调试costPrice')
await tbProductStockOperateOutAndOn(this.queryForm) await tbProductStockOperateOutAndOn(this.queryForm)
this.queryFormLoading = false this.queryFormLoading = false
this.showResult = true this.showResult = true