[fix]页面优化

develop
huyuanxiang 2 years ago
parent ef55eb3056
commit 39b24b34ce

@ -11,7 +11,8 @@ import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
* 则映射后端域名通过 vue.config.js
* @type {*|string}
*/
let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
let apiBaseUrl = 'http://47.100.1.234:8080/jeecg-boot'
// let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
//console.log("apiBaseUrl= ",apiBaseUrl)
// 创建 axios 实例
const service = axios.create({

@ -100,6 +100,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AddrManagerModal from './modules/AddrManagerModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import addrManagerList from '@views/erp/const/addrManagerList'
export default {
name: 'AddrManagerList',
@ -111,71 +112,7 @@
return {
description: '地址管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户id',
align:"center",
dataIndex: 'userId'
},
{
title:'省',
align:"center",
dataIndex: 'province'
},
{
title:'市',
align:"center",
dataIndex: 'city'
},
{
title:'地区',
align:"center",
dataIndex: 'county'
},
{
title:'地址',
align:"center",
dataIndex: 'detail'
},
{
title:'接收人',
align:"center",
dataIndex: 'recipient'
},
{
title:'手机',
align:"center",
dataIndex: 'telephone'
},
{
title:'是否默认0否 默认1是',
align:"center",
dataIndex: 'isDefault_dictText'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
columns: addrManagerList,
url: {
list: "/erp/addrManager/list",
delete: "/erp/addrManager/delete",

@ -100,6 +100,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsModal from './modules/GoodsModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import goodsList from '@views/erp/const/goodsList'
export default {
name: 'GoodsList',
@ -111,61 +112,7 @@
return {
description: '产品信息管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'价格',
align:"center",
dataIndex: 'price'
},
{
title:'产品名称',
align:"center",
dataIndex: 'goodsName'
},
{
title:'分类',
align:"center",
dataIndex: 'category'
},
{
title:'规格',
align:"center",
dataIndex: 'specs'
},
{
title:'厂商',
align:"center",
dataIndex: 'factory'
},
{
title:'是否销售01是 默认',
align:"center",
dataIndex: 'ifSale_dictText'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
columns: goodsList,
url: {
list: "/erp/goods/list",
delete: "/erp/goods/delete",

@ -46,7 +46,20 @@
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<template #state="text, record">
<div>
<a-tag color="green" v-if="record.state === 3">
{{ record.state_dictText }}
</a-tag>
<a-tag v-else-if="record.state === 5">
{{ record.state_dictText }}
</a-tag>
<a-tag color="red" v-else>
{{ record.state_dictText }}
</a-tag>
</div>
</template>
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
@ -69,8 +82,8 @@
<span slot="action" slot-scope="text, record">
<a v-has="'erp:order:edit'" @click="handleEdit(record)"></a>
<a v-has="'erp:order:check'" @click="handleConfirm(1, record)"></a>
<a v-has="'erp:order:dispatch'" @click="handleConfirm(2, record)"></a>
<a v-if='record.state === 0' v-has="'erp:order:check'" @click="handleConfirm(1, record, )"></a>
<a v-if='record.state === 1' v-has="'erp:order:dispatch'" @click="handleConfirm(2, record, )"></a>
<a-divider type="vertical" />
<a-dropdown>
@ -92,6 +105,42 @@
</div>
<order-modal ref="modalForm" @ok="modalFormOk"/>
<a-modal
:title="infoModel.title"
:visible="infoModel.visible"
:confirm-loading="infoModel.confirmLoading"
@cancel="handleCloseInfoModal"
>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<a-form-model-item ref="logistics_id" label="物流单号" prop="logistics_id" v-if="rowInfo.state === 2">
<a-input
v-model="form.logistics_id"
@blur="
() => {
$refs.logistics_id.onFieldBlur();
}
"
/>
</a-form-model-item>
<a-form-model-item label="备注" prop="desc">
<a-input v-model="form.desc" type="textarea" />
</a-form-model-item>
</a-form-model>
<template v-slot:footer>
<a-button key="back" type='danger' :loading="infoModel.confirmLoading" @click="handleOk('cancel')">
不通过
</a-button>
<a-button key="submit" type="primary" :loading="infoModel.confirmLoading" @click="handleOk('ok')">
通过
</a-button>
</template>
</a-modal>
</a-card>
</template>
@ -102,6 +151,9 @@
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import { editOrder } from '@/api/shop'
import orderList from '@views/erp/const/orderList'
import { mapGetters } from 'vuex'
import moment from 'moment'
export default {
name: "OrderList",
@ -111,88 +163,25 @@
},
data () {
return {
labelCol: { span: 4 },
wrapperCol: { span: 18 },
other: '',
rowInfo: {
state: -1,
row: {}
},
form: { },
rules: {
},
infoModel: {
title: '审核',
visible: false,
confirmLoading: false,
ModalText: 'Content of the modal',
},
description: '订单管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'收件人',
align:"center",
dataIndex: 'recipient'
},
{
title:'手机',
align:"center",
dataIndex: 'mobile'
},
{
title:'总金额',
align:"center",
dataIndex: 'totalAmount'
},
{
title:'用户id',
align:"center",
dataIndex: 'userId'
},
{
title:'地址',
align:"center",
dataIndex: 'addr'
},
{
title:'审核人',
align:"center",
dataIndex: 'financeReview'
},
{
title:'审核时间',
align:"center",
dataIndex: 'financeTime'
},
{
title:'审核意见',
align:"center",
dataIndex: 'financeRemark'
},
{
title:'派单人',
align:"center",
dataIndex: 'dispacher'
},
{
title:'派发时间',
align:"center",
dataIndex: 'dispacherTime'
},
{
title:'状态,0:待付款 默认1待发货2已发货3完结4退换货',
align:"center",
dataIndex: 'state_dictText'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' },
}
],
columns: orderList,
url: {
list: "/erp/order/list",
delete: "/erp/order/delete",
@ -214,21 +203,99 @@
}
},
methods: {
handleConfirm(state, row) {
const that = this
...mapGetters(["userInfo"]),
handleOk(type) {
const that = this
const user = that.userInfo()
if (type === "ok" && that.rowInfo.state === 2 && !that.form.logistics_id) {
this.$message.warn('请填写物流单号')
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.$confirm({
title: "确认操作",
content: "是否确认此操作?",
onOk: function () {
row.state = state
addOrder(row).then(res => {
that.$message.success('操作成功');
that.loadData(1);
})
title: "确认操作",
content: "是否确认此操作?",
onOk: function () {
that.infoModel.confirmLoading = true
const state = type === 'cancel'? 5 : that.rowInfo.state
const time = moment().format('YYYY-MM-DD HH:mm:ss')
let params = {
state,
id: that.rowInfo.row.id
}
if (that.rowInfo.state === 1) {
params.financeReview = user.realname
params.financeTime = time
params.financeId = user.id
params.financeRemark = that.form.desc
} else if (that.rowInfo.state === 2) {
params.dispacher = user.realname
params.dispacherId = user.id
params.logisticsId = that.form.logistics_id
params.dispacherTime = time
params.dispacherRemark = that.form.desc
}
params = Object.assign({}, that.rowInfo.row, params)
editOrder(params).then(res => {
that.infoModel.confirmLoading = false
that.infoModel.visible = false
if (res.result) {
that.$message.success('操作成功');
that.loadData(1);
} else {
that.$message.warn(res.message);
}
}).catch(() => {
that.infoModel.confirmLoading = false
that.infoModel.visible = false
})
},
}
})
} else {
return false;
}
});
},
handleCancel() {
console.log()
},
handleCloseInfoModal() {
this.infoModel.visible = false
},
handleConfirm(state, row) {
if (![0, 1].includes(row.state)) {
this.$message.error('该状态无权限操作')
return
}
this.form = {}
this.rules = {}
const baseObject = {desc: ''}
const baseObjectRules = { desc: [{ message: '填写备注', trigger: 'blur' }]}
const textOBj = {
1: '审核',
2: '派发'
}
const obj = {
1: Object.assign({}, baseObject),
2: Object.assign({
logistics_id: '',
}, baseObject)
}
this.form = obj[state]
//
// this.rules = state === 2 ? Object.assign({}, this.rules, {
// logistics_id: [
// { required: true, message: '', trigger: 'blur' },
// ],}) : this.rules
this.infoModel.title = textOBj[state]
this.infoModel.visible = true
this.rowInfo = {
row,
state
}
},
initDictConfig(){
},
getSuperFieldList(){

@ -0,0 +1,65 @@
export default [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户id',
align:"center",
dataIndex: 'userId'
},
{
title:'省',
align:"center",
dataIndex: 'province'
},
{
title:'市',
align:"center",
dataIndex: 'city'
},
{
title:'地区',
align:"center",
dataIndex: 'county'
},
{
title:'地址',
align:"center",
dataIndex: 'detail'
},
{
title:'接收人',
align:"center",
dataIndex: 'recipient'
},
{
title:'手机',
align:"center",
dataIndex: 'telephone'
},
{
title:'默认地址',
align:"center",
dataIndex: 'isDefault_dictText'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
]

@ -0,0 +1,55 @@
export default [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'价格',
align:"center",
dataIndex: 'price'
},
{
title:'产品名称',
align:"center",
dataIndex: 'goodsName'
},
{
title:'分类',
align:"center",
dataIndex: 'category'
},
{
title:'规格',
align:"center",
dataIndex: 'specs'
},
{
title:'厂商',
align:"center",
dataIndex: 'factory'
},
{
title:'是否销售',
align:"center",
dataIndex: 'ifSale_dictText'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
]

@ -0,0 +1,92 @@
export default [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'收件人',
align:"center",
dataIndex: 'recipient'
},
{
title:'手机',
align:"center",
dataIndex: 'mobile'
},
{
title:'总金额',
align:"center",
dataIndex: 'totalAmount'
},
{
title:'用户id',
align:"center",
dataIndex: 'userId'
},
{
title:'订单状态',
align:"center",
dataIndex: 'state',
scopedSlots: { customRender: 'state' }
},
{
title:'下单地址',
align:"center",
dataIndex: 'addr'
},
{
title:'审核人',
align:"center",
dataIndex: 'financeReview'
},
{
title:'审核时间',
align:"center",
dataIndex: 'financeTime'
},
{
title:'审核意见',
align:"center",
dataIndex: 'financeRemark'
},
{
title:'派单人',
align:"center",
dataIndex: 'dispacher'
},
{
title:'派发时间',
align:"center",
dataIndex: 'dispacherTime'
},
{
title:'物流单号',
align:"center",
dataIndex: 'logisticsId'
},
{
title:'派发意见',
align:"center",
dataIndex: 'dispacherRemark'
},
{
title:'订单备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' },
}
]

@ -29,6 +29,11 @@
<a-input v-model="model.addr" placeholder="请输入地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="审核人ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeId">
<a-input v-model="model.financeId" placeholder="请输入审核人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="financeReview">
<a-input v-model="model.financeReview" placeholder="请输入审核人" ></a-input>
@ -44,19 +49,34 @@
<a-input v-model="model.financeRemark" placeholder="请输入审核意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="派单人ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherId">
<a-input v-model="model.dispacherId" placeholder="请输入派单人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="派单人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacher">
<a-input v-model="model.dispacher" placeholder="请输入派单人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="物流单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsId">
<a-input v-model="model.logisticsId" placeholder="请输入物流单号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="派发时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherTime">
<j-date placeholder="请选择派发时间" v-model="model.dispacherTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="状态,0:待付款 默认1待发货2已发货3完结4退换货" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="orderState" placeholder="请选择状态,0:待付款 默认1待发货2已发货3完结4退换货" />
<a-form-model-item label="派发意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dispacherRemark">
<a-input v-model="model.dispacherRemark" placeholder="请输入派单意见" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="订单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state">
<j-dict-select-tag type="list" v-model="model.state" dictCode="orderState" placeholder="请选择状态" />
</a-form-model-item>
</a-col>
<a-col :span="24" >

Loading…
Cancel
Save