优化问题
This commit is contained in:
parent
ad74689313
commit
939702e998
|
|
@ -4,8 +4,10 @@ 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.133:8000'
|
||||||
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
|
# 测试
|
||||||
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
VUE_APP_BASE_API = 'https://admintestpapi.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'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@ ENV = 'production'
|
||||||
|
|
||||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||||
VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
|
# 测试
|
||||||
# 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 = 'http://192.168.2.98:8000'
|
# VUE_APP_BASE_API = 'http://192.168.2.98:8000'
|
||||||
# 如果接口是 http 形式, wss 需要改为 ws
|
# 如果接口是 http 形式, wss 需要改为 ws
|
||||||
VUE_APP_WS_API = 'wss://123.56.110.252
|
VUE_APP_WS_API = 'wss://123.56.110.252
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,16 @@ export function stockStateChange(params) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 警戒设置
|
||||||
|
export function stockStatewarnLine(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/stock/warnLine`,
|
||||||
|
method: "put",
|
||||||
|
data: {
|
||||||
|
...params
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
// 共享库存
|
// 共享库存
|
||||||
export function stockStateChanges(params) {
|
export function stockStateChanges(params) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
this.tableData.loading = true
|
this.tableData.loading = true
|
||||||
console.log(this.query.createdAt, '调试111')
|
|
||||||
let arr = []
|
let arr = []
|
||||||
if (this.query.createdAt.length) {
|
if (this.query.createdAt.length) {
|
||||||
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
|
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog title="详情" width="80%" :visible.sync="dialogVisible" @close="dialogVisible = false">
|
<el-dialog title="详情" width="80%" :visible.sync="dialogVisible" @close="dialogVisible = false">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<span>【{{ tableData.detail.type == 'reject' ? '退货出库' : '供应商入库' }}】</span>
|
<span>【{{ tableData.detail.subType == '-1' ? '退货出库' : '供应商入库' }}】</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px">
|
<el-table :data="tableData.detail.stockSnap" v-loading="tableData.loading" height="400px">
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<el-table-column label="原库存" prop="stockNumber"></el-table-column>
|
<el-table-column label="原库存" prop="stockNumber"></el-table-column>
|
||||||
<el-table-column label="变动数量" prop="number">
|
<el-table-column label="变动数量" prop="number">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
{{ scope.row.number }} {{ scope.row.unitName }}
|
<span v-if="tableData.detail.subType==-1">-</span> {{ scope.row.number }} {{ scope.row.unitName }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-input v-model="query.name" size="small" clearable placeholder="商品名称"
|
<el-input v-model="query.name" size="small" clearable placeholder="商品名称"
|
||||||
@keyup.enter.native="getTableData" />
|
@keyup.enter.native="getTableData" />
|
||||||
<el-input v-model="query.num" placeholder="库存数量:少于多少xx" />
|
<!-- <el-input v-model="query.num" placeholder="库存数量:少于多少xx" /> -->
|
||||||
<div style="width: 300px;">
|
<div style="width: 300px;">
|
||||||
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
<el-select v-model="query.isStock" placeholder="库存开关" style="width: 100%;">
|
||||||
<el-option label="开" :value="1">开</el-option>
|
<el-option label="开" :value="1">开</el-option>
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
<el-button @click="Uppop()">库存预警:{{ warnLine }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-button icon="el-icon-download" :loading="downloadLoading" @click="protHandle">导出库存</el-button>
|
<el-button icon="el-icon-download" :loading="downloadLoading" @click="protHandle">导出库存</el-button>
|
||||||
|
|
@ -34,14 +35,14 @@
|
||||||
<el-table-column label="商品信息" width="200px">
|
<el-table-column label="商品信息" width="200px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="shop_info">
|
<div class="shop_info">
|
||||||
<el-image :src="scope.row.img" class="cover" v-if="scope.row.iskaiguans!=1">
|
<el-image :src="scope.row.img" class="cover" v-if="scope.row.iskaiguans != 1">
|
||||||
<div class="img_error" slot="error">
|
<div class="img_error" slot="error">
|
||||||
<i class="icon el-icon-document-delete"></i>
|
<i class="icon el-icon-document-delete"></i>
|
||||||
</div>
|
</div>
|
||||||
</el-image>
|
</el-image>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span>{{ scope.row.name }}</span>
|
<span>{{ scope.row.name }}</span>
|
||||||
<div v-if="scope.row.iskaiguans!=1">
|
<div v-if="scope.row.iskaiguans != 1">
|
||||||
<el-tag type="primary">{{ scope.row.type }}</el-tag>
|
<el-tag type="primary">{{ scope.row.type }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,15 +50,17 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" prop="number">
|
<el-table-column label="规格" prop="number">
|
||||||
<template v-slot="scope" >
|
<template v-slot="scope">
|
||||||
<div v-if="scope.row.iskaiguans ">
|
<div v-if="scope.row.iskaiguans">
|
||||||
{{ scope.row.specSnap }}
|
{{ scope.row.specSnap }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存" prop="number">
|
<el-table-column label="库存" prop="number" >
|
||||||
<template v-slot="scope">
|
<template v-slot="scope" >
|
||||||
{{ `${scope.row.stockNumber} ${scope.row.unitName}` }}
|
<span :class="[scope.row.stockNumber<=warnLine?'colorStyle':'']">
|
||||||
|
{{ `${scope.row.stockNumber} ${scope.row.unitName}` }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
@ -97,11 +100,23 @@
|
||||||
<el-dialog title="导入库存" :visible.sync="dialogVisible">
|
<el-dialog title="导入库存" :visible.sync="dialogVisible">
|
||||||
<UploadExcel :beforeUpload="excelSuccessUpload" />
|
<UploadExcel :beforeUpload="excelSuccessUpload" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 预存弹窗组件 -->
|
||||||
|
<el-dialog title="" :visible.sync="dialogTableVisible" width="350px">
|
||||||
|
<el-form>
|
||||||
|
<el-form-item label="库存预存设置" label-width="120px">
|
||||||
|
<el-input v-model="montey" type="number" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogTableVisible = false; montey = ''">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="sumbit()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { stock, stockdownload, stockdoImport, stockStateChange, stockStateChanges, stocks } from '@/api/invoicing'
|
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
|
||||||
import settings from '@/settings'
|
import settings from '@/settings'
|
||||||
import invoicingDetail from './components/invoicingDetail'
|
import invoicingDetail from './components/invoicingDetail'
|
||||||
import UploadExcel from '@/components/UploadExcel/'
|
import UploadExcel from '@/components/UploadExcel/'
|
||||||
|
|
@ -114,6 +129,8 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
dialogTableVisible: false,
|
||||||
|
montey: "",
|
||||||
query: {
|
query: {
|
||||||
name: '',
|
name: '',
|
||||||
isStock: '',
|
isStock: '',
|
||||||
|
|
@ -121,6 +138,7 @@ export default {
|
||||||
},
|
},
|
||||||
downloadLoading: false,
|
downloadLoading: false,
|
||||||
uploadLoading: false,
|
uploadLoading: false,
|
||||||
|
warnLine:null, // 警戒线
|
||||||
tableData: {
|
tableData: {
|
||||||
page: 0,
|
page: 0,
|
||||||
size: 10,
|
size: 10,
|
||||||
|
|
@ -135,6 +153,27 @@ export default {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Uppop() {
|
||||||
|
this.dialogTableVisible = true
|
||||||
|
},
|
||||||
|
async sumbit() {
|
||||||
|
try {
|
||||||
|
const res = await stockStatewarnLine({
|
||||||
|
shopId: localStorage.getItem("shopId"),
|
||||||
|
warnLine: this.montey
|
||||||
|
})
|
||||||
|
|
||||||
|
this.$message({ type: 'success', message: '修改成功!' });
|
||||||
|
setTimeout(() => {
|
||||||
|
this.dialogTableVisible = false
|
||||||
|
this.montey = ''
|
||||||
|
this.getTableData()
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
async load(tree, treeNode, resolve) {
|
async load(tree, treeNode, resolve) {
|
||||||
const res = await stocks({
|
const res = await stocks({
|
||||||
productId: tree.proId,
|
productId: tree.proId,
|
||||||
|
|
@ -243,6 +282,7 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.warnLine = res.warnLine
|
||||||
this.tableData.list = res.content
|
this.tableData.list = res.content
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -299,6 +339,10 @@ export default {
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.colorStyle{
|
||||||
|
color: rgb(231, 42, 42);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.cell {
|
.cell {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div class="filter_wrap">
|
<div class="filter_wrap">
|
||||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" @change="getTableData">
|
end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="getTableData">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
|
@ -81,12 +81,19 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
this.tableData.loading = true
|
this.tableData.loading = true
|
||||||
|
let arr = []
|
||||||
|
console.log(this.query,'tiaoshi1')
|
||||||
|
if (this.query.createdAt.length) {
|
||||||
|
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
|
||||||
|
} else {
|
||||||
|
arr = []
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const res = await tbProductStockOperateList({
|
const res = await tbProductStockOperateList({
|
||||||
page: this.tableData.page,
|
page: this.tableData.page,
|
||||||
size: this.tableData.size,
|
size: this.tableData.size,
|
||||||
shopId: localStorage.getItem('shopId'),
|
shopId: localStorage.getItem('shopId'),
|
||||||
createdAt: this.query.createdAt
|
createdAt: arr
|
||||||
})
|
})
|
||||||
this.tableData.loading = false
|
this.tableData.loading = false
|
||||||
this.tableData.list = res.content
|
this.tableData.list = res.content
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ export default {
|
||||||
this.tableData.list.forEach(ele => {
|
this.tableData.list.forEach(ele => {
|
||||||
zong += ele.costPrice * ele.number
|
zong += ele.costPrice * ele.number
|
||||||
})
|
})
|
||||||
this.queryForm.totalAmount = zong
|
this.queryForm.totalAmount = parseFloat(zong.toFixed(2))
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitHandle() {
|
submitHandle() {
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
<router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.id } }">
|
<router-link :to="{ name: 'purchase_detail', query: { purveyorId: scope.row.id } }">
|
||||||
<el-button type="text" size="mini">查看详情</el-button>
|
<el-button type="text" size="mini">结款记录</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<!-- <div class="head-container">
|
||||||
<div class="select_count_wrap">
|
<div class="select_count_wrap">
|
||||||
<div class="select_count">
|
<div class="select_count">
|
||||||
<i class="icon el-icon-warning"></i>
|
<i class="icon el-icon-warning"></i>
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button>批量付款</el-button>
|
<el-button>批量付款</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table :data="tableData.list" v-loading="tableData.loading" @select="selectHandle"
|
<el-table :data="tableData.list" v-loading="tableData.loading" @select="selectHandle"
|
||||||
@select-all="selectHandle">
|
@select-all="selectHandle">
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="应付金额" prop="totalAmount">
|
<el-table-column label="应付金额" prop="totalAmount">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
¥{{ scope.row.totalAmount }}
|
<span v-if="scope.row.type != 'purveyor'">-</span> ¥{{ scope.row.totalAmount }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已付款金额" prop="totalAmount">
|
<el-table-column label="已付款金额" prop="totalAmount">
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待付款金额" prop="waitAmount">
|
<el-table-column label="待付款金额" prop="waitAmount">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span class="num" >¥{{ scope.row.waitAmount }}</span>
|
<span class="num"><span v-if="scope.row.type != 'purveyor'">-</span> ¥{{ scope.row.waitAmount }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="status">
|
<el-table-column label="状态" prop="status">
|
||||||
|
|
@ -114,6 +114,7 @@
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="付款方式" prop="payType"></el-table-column>
|
||||||
<el-table-column label="备注" prop="remark"></el-table-column>
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||||
<el-table-column label="付款时间" prop="updatedAt">
|
<el-table-column label="付款时间" prop="updatedAt">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
|
@ -137,10 +138,13 @@
|
||||||
<el-form>
|
<el-form>
|
||||||
<el-form-item label="付款金额" label-width="80px">
|
<el-form-item label="付款金额" label-width="80px">
|
||||||
<el-input v-model="montey" type="number" autocomplete="off"></el-input>
|
<el-input v-model="montey" type="number" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="付款方式" label-width="80px">
|
||||||
|
<el-input v-model="payType" type="text" autocomplete="off"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogTableVisible = false">取 消</el-button>
|
<el-button @click="dialogTableVisible = false; montey = '';payType=''">取 消</el-button>
|
||||||
<el-button type="primary" @click="sumbit()">确 定</el-button>
|
<el-button type="primary" @click="sumbit()">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
@ -206,6 +210,7 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
montey: null,
|
montey: null,
|
||||||
|
payType:null,
|
||||||
selectCount: 0,
|
selectCount: 0,
|
||||||
query: {
|
query: {
|
||||||
type: '',
|
type: '',
|
||||||
|
|
@ -237,11 +242,14 @@ export default {
|
||||||
const res = await paidAmount({
|
const res = await paidAmount({
|
||||||
id: this.idinfo,
|
id: this.idinfo,
|
||||||
paidAmount: this.montey,
|
paidAmount: this.montey,
|
||||||
|
payType:this.payType
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$message({ type: 'success', message: '付款成功!' });
|
this.$message({ type: 'success', message: '付款成功!' });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.dialogTableVisible = false
|
this.dialogTableVisible = false
|
||||||
|
this.montey = ''
|
||||||
|
this.payType = ''
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}, 1500);
|
}, 1500);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue