Commit 67470005 authored by 张宗旭's avatar 张宗旭

提交

parent 3f76ebf7
......@@ -14,15 +14,31 @@ export const uploadImg = {
url: '/api/upload/one/path'
}
// 客户
// 客户列表
// 客户列表 搜索
export const getCustomerList = {
url: ''
url: '/api/customer/find/all/page'
}
// 新增客户
export const addCustomer = {
url: '/api/customer/insert'
}
// 获取 一条 客户
export const getOneCustomer = {
url: '/api/customer/get/one/openId/'
}
// 停用 客户
export const disablesCustomer = {
url: '/api/customer/disables/'
}
// 启用 客户
export const enableCustomer = {
url: '/api/customer/enable/'
}
// 获取 所有 客户 名称
export const getCustomerName = {
url: '/api/customer/get/all/name'
}
// 产品
// 产品 列表
export const getProduct = {
......@@ -42,10 +58,70 @@ export const editProduct = {
}
// 采购单
// 搜索 采购单
export const getAllOrder = {
export const purchaseOrderFind = {
url: '/api/purchase/order/find/page'
}
// 新增 采购单
export const addPurchaseOrder = {
url: '/api/purchase/order/insert'
}
// 采购单 详情
export const getOneOrderNum = {
url: '/api/purchase/order/get/one/orderNum/'
}
// 禁用 采购单下所有车辆
export const purchaseOrderDisableCar = {
url: '/api/purchase/order/disable/car/'
}
// 启用 采购单下所有车辆
export const purchaseOrderEnableCar = {
url: '/api/purchase/order/enable/car/'
}
// 作废 采购单
export const purchaseOrderDelete = {
url: '/api/purchase/order/delete/'
}
// 供应商
// 新增供应商
export const addBusiness = {
url: '/api/company/insert/supplier'
}
// 修改 供应商
export const modiyBusiness = {
url: '/api/company/update/supplier'
}
// 获取 供应商 列表
export const getBusinessList = {
url: '/api/company/get/supplier/all/page'
}
// 获取 供应商 详情
export const getBusiness = {
url: '/api/company/get/supplier/openId/'
}
// 获取 供应商 商家介绍
export const getBusinessInit = {
url: '/api/company/get/supplier/introduce/'
}
// 获取 供应商 宣传图片
export const getBusinessImg = {
url: '/api/company/get/supplier/brochure/image/'
}
// 获取 供应商 套餐订餐截止时间
export const getBusinessSupplierDeadline = {
url: '/api/company/get/supplier/deadline/'
}
// 修改 供应商 密码
export const modifyPws = {
url: '/api/company/update/supplier/password'
}
// 禁用 供应商
export const disableBusiness = {
url: '/api/company/disable/supplier'
}
// 启用 供应商
export const enableBusiness = {
url: '/api/company/enable/supplier'
}
// 常量
// 客户 性质
export const getCustomerNature = {
......@@ -59,15 +135,19 @@ export const getCustomerType = {
export const getProductType = {
url: '/constant/get/product/type'
}
// 通过 产品类型 获取 产品型号
export const getAllModel = {
url: '/api/product/get/all/model/'
// 客户 账户 状态
export const getCustomerState = {
url: '/constant/get/customer/state'
}
// 付费 模式
export const getPaymentModel = {
export const getPurchaseOrderPaymentModel = {
url: '/constant/get/purchaseOrder/paymentModel'
}
// 生产 状态
export const getproductionState = {
export const getPurchaseOrderProductionState = {
url: '/constant/get/purchaseOrder/productionState'
}
\ No newline at end of file
}
// 根据产品类型 获取 产品型号
export const getAllModel = {
url: '/api/product/get/all/model/'
}
......@@ -44,6 +44,17 @@ const frameIn = [
},
component: _import('customer/add/index')
},
// 客户 详情
{
path: 'customerDetails/:id',
name: 'customerDetails/:id',
meta: {
title: '客户详情',
auth: true
},
component: _import('customer/details/index')
},
// 产品
// 添加 产品
{
......@@ -88,12 +99,12 @@ const frameIn = [
auth: true
},
component: _import('purchaseOrder/list/index')
component: _import('purchaseOrder/purchaseOrderList/index')
},
// 添加 采购单
// 添加采购单
{
path: 'addPurchaseOrder',
name: 'addPurchaseOrder',
path: 'addpurchaseOrder',
name: 'addpurchaseOrder',
meta: {
title: '添加采购单',
auth: true
......@@ -101,6 +112,19 @@ const frameIn = [
},
component: _import('purchaseOrder/add/index')
},
// 采购单 详情
{
path: 'purchaseOrderDetails/:id',
name: 'purchaseOrderDetails/:id',
meta: {
title: '采购单详情',
auth: true
},
component: _import('purchaseOrder/details/index')
},
// 商家 列表
{
path: 'businessList',
......@@ -132,6 +156,7 @@ const frameIn = [
},
component: _import('business/add/index')
},
//
// 详情
{
path: 'detailsBusiness/:id',
......
<template>
<d2-container v-loading="isLoading">
<div>
<div class="providerOrderList-container">
<div class="d-f-j"
style="background: #f2f3f5">
<div>
<div class="name">基本信息</div>
</div>
<!-- <div class="name modify"
@click="basicModiy()">修改</div> -->
</div>
</div>
<div class="df"
style="margin-top: 20px">
<div class="df left">
<div>客户名称:</div>
<div>{{ datas.name }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>机构编码:</div>
<div>{{ datas.coding }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>商家类型:</div>
<div>{{ datas.typeValue }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>商家性质:</div>
<div>{{ datas.natureValue }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>联系人:</div>
<div>{{ datas.contact }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>联系电话:</div>
<div>{{ datas.contactPhone }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>所在城市:</div>
<div>{{ datas.provinceName }}{{ datas.cityName }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>联系邮箱:</div>
<div>{{ datas.email }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>状态:</div>
<div>{{ datas.stateValue }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>创建时间:</div>
<div>{{ datas.createTime }}</div>
</div>
</div>
</div>
</d2-container>
</template>
<script>
import { getOneCustomer, modifyPws } from "@/libs/common/constant";
export default {
data() {
return {
isLoading: false,
datas: {},
isShow: true,
lunchTime: "",
dinnerTime: "",
imge: "",
openId: this.$route.params.id,
isShowImage: false,
img: "",
isModifyPassword: false,
};
},
async created() {
await this.getData();
},
methods: {
async getData() {
this.isLoading = true;
await this.getOneCustomer(this.openId);
},
async getOneCustomer(openId) {
const res = await this.$api.GET(`${getOneCustomer.url}${openId}`);
this.datas = res
this.isLoading = false;
console.log(res, "11");
},
lookImage(type) {
console.log(type);
if (type == "logo") {
this.img = this.datas.logImage;
// 这是logo
} else if (type == "license") {
// 这是营业执照
this.img = this.datas.businessImage;
}
this.isShowImage = true;
},
noShowImg() {
this.isShowImage = false;
},
async modifyPsw(data) {
const pages = {
loginName: this.datas.loginName,
supplierOpenId: this.openId,
loginPwd: data.password,
};
const res = await this.$api.POST(`${modifyPws.url}`, pages);
console.log(res, "修改结果");
this.isModifyPassword = false;
},
async noModify() {
this.isModifyPassword = false;
},
// 设置基本信息
basicModiy() {
this.$router.push({
path: `/basicModiy/${this.openId}`,
});
},
// 联系信息设置
contactModiy() {
this.$router.push({
path: `/contactModiy/${this.openId}`,
});
},
// 收款信息 设置
chargeModiy() {
this.$router.push({
path: `/chargeModiy/${this.openId}`,
});
},
// 商家介绍
lookIntroduce() {
this.$router.push({
path: `/businessIntroduce/${this.openId}`,
});
},
// 重置密码
resetting() {
this.isModifyPassword = true;
},
},
};
</script>
<style lang="scss" scoped>
.d-f-j {
display: flex;
justify-content: space-between;
}
.df {
display: flex;
}
.name {
height: 50px;
line-height: 50px;
margin-left: 10px;
}
.modify {
margin-right: 20px;
color: blue;
cursor: pointer;
}
.button {
margin-top: 20px;
margin-right: 10px;
}
.left {
width: 400px;
line-height: 40px;
margin-left: 30px;
}
.right {
line-height: 40px;
margin-right: 30px;
}
</style>
This diff is collapsed.
......@@ -150,6 +150,9 @@ export default {
this.$refs[detail].validate(async (valid) => {
if (valid) {
try {
// 提交前 处理 数据
// 拼接 营业时间 转换 时间
// var data = await this.arrangeData();
// 判断 参数 确定是修改还是 添加
if (this.editId) {
console.log(this.form, "编辑提交的参数");
......
......@@ -62,9 +62,9 @@
width="120">
<template slot-scope="scope">
<!-- 编辑 -->
<el-button type="text"
<!-- <el-button type="text"
style="font-size: 14px; margin-left: 0px"
@click="detils(scope.row.openId)">查看详情</el-button>
@click="detils(scope.row.openId)">查看详情</el-button> -->
<el-button type="text"
style="font-size: 14px; margin-left: 10px"
......
......@@ -6,19 +6,23 @@
ref="form"
:rules="rules">
<el-form-item label="客户名称:"
prop="name">
<el-input v-model="form.name"
placeholder="请填写"
autocomplete="off"
maxlength="50"
:show-word-limit="true"
class="filter-item-same-width" />
prop="customerName">
<el-select v-model="form.customerName"
placeholder="请选择"
class="filter-item-same-width">
<el-option v-for="item in customerNameList"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="产品类型:"
prop="type">
<el-select v-model="form.type"
prop="productType">
<el-select v-model="form.productType"
placeholder="请选择"
@change="getAllModel"
class="filter-item-same-width">
<el-option v-for="item in typeList"
:key="item.value"
......@@ -29,24 +33,50 @@
</el-form-item>
<el-form-item label="产品型号:"
prop="model">
<el-input v-model="form.model"
placeholder="请填写"
autocomplete="off"
maxlength="30"
:show-word-limit="true"
class="filter-item-same-width" />
prop="productModel">
<el-select v-model="form.productModel"
placeholder="请选择"
class="filter-item-same-width">
<el-option v-for="item in allModelList"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="搜索前缀:"
prop="">
<el-input v-model="form.searchPrefix"
<el-form-item label="付费模式:"
prop="paymentModel">
<el-select v-model="form.paymentModel"
placeholder="请选择"
class="filter-item-same-width">
<el-option v-for="item in paymentModelList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="计划采购数量:"
prop="projectedNumber">
<el-input v-model="form.projectedNumber"
placeholder="请填写"
autocomplete="off"
maxlength="30"
maxlength="50"
:show-word-limit="true"
class="filter-item-same-width" />
</el-form-item>
<el-form-item label="预计交货时间:"
prop="estimatedDeliveryTime">
<el-date-picker v-model="form.estimatedDeliveryTime"
type="date"
value-format="yyyy-MM-dd hh:mm:ss"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="备注:"
prop="">
<el-input v-model="form.remark"
......@@ -73,11 +103,13 @@
<script>
import { mapState, mapActions } from "vuex";
import {
addProduct,
addPurchaseOrder,
getProductType,
getOneProduct,
editProduct
editProduct,
getCustomerName,
getAllModel,
getPurchaseOrderPaymentModel,
} from "@/libs/common/constant";
import { selectList, generateTiemList, weekList } from "@/utils/json";
import dayjs from "dayjs";
......@@ -86,20 +118,43 @@ export default {
return {
isLoading: false,
form: {
name: "",
type: "",
model: "",
searchPrefix: "",
remark: "",
customerName: "",
productType: "",
productModel: "",
paymentModel: "",
projectedNumber: "",
estimatedDeliveryTime: "",
},
ifSubmit: false,
typeList: [],
customerNameList: [],
allModelList: [],
paymentModelList: [],
// 禁用今天之前的日期
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
// 编辑
editId: this.$route.params.id,
rules: {
name: [{ required: true, message: "请填写", trigger: "blur" }],
model: [{ required: true, message: "请填写", trigger: "blur" }],
type: [{ required: true, message: "请选择", trigger: "change" }],
customerName: [{ required: true, message: "请填写", trigger: "blur" }],
projectedNumber: [
{ required: true, message: "请填写", trigger: "blur" },
],
estimatedDeliveryTime: [
{ required: true, message: "请填写", trigger: "blur" },
],
productType: [{ required: true, message: "请选择", trigger: "change" }],
productModel: [
{ required: true, message: "请选择", trigger: "change" },
],
paymentModel: [
{ required: true, message: "请选择", trigger: "change" },
],
productType: [{ required: true, message: "请选择", trigger: "change" }],
productType: [{ required: true, message: "请选择", trigger: "change" }],
},
};
},
......@@ -121,6 +176,8 @@ export default {
// 获取 字典数据
async getConstant() {
await this.getProductType();
await this.getCustomerName();
await this.getPurchaseOrderPaymentModel();
},
selectList(myJson, a) {
return selectList(myJson, a);
......@@ -136,13 +193,30 @@ export default {
const res = await this.$api.GET(`${getProductType.url}`);
this.typeList = this.selectList(res);
},
// 获取 客户 名称
async getCustomerName() {
const res = await this.$api.GET(`${getCustomerName.url}`);
this.customerNameList = this.selectList(res);
console.log(this.customerNameList);
},
// 获取 产品 型号
async getAllModel() {
const res = await this.$api.GET(
`${getAllModel.url}${this.form.productType}`
);
this.allModelList = this.selectList(res);
},
// 获取 付费模式
async getPurchaseOrderPaymentModel() {
const res = await this.$api.GET(`${getPurchaseOrderPaymentModel.url}`);
this.paymentModelList = this.selectList(res);
},
async cancel() {
var tagName = this.current;
await this.close({ tagName });
this.$router.push("/productList");
this.$router.push("/purchaseOrderList");
},
submit(detail) {
if (this.ifSubmit) {
return;
}
......@@ -162,7 +236,7 @@ export default {
} else {
console.log(this.form, "添加提交的参数");
// 提交 接口
await this.addProduct(this.form);
await this.addPurchaseOrder(this.form);
}
await this.cancel();
this.$message({
......@@ -178,8 +252,8 @@ export default {
});
},
// 添加 产品
async addProduct(data) {
const res = await this.$api.POST(`${addProduct.url}`, data);
async addPurchaseOrder(data) {
const res = await this.$api.POST(`${addPurchaseOrder.url}`, data);
console.log(res, "添加产品接口成功的返回");
},
// 编辑
......@@ -187,7 +261,7 @@ export default {
async getOneProduct(openId) {
const res = await this.$api.GET(`${getOneProduct.url}${openId}`);
console.log(res);
this.form = res
this.form = res;
this.isLoading = false;
},
},
......
<template>
<d2-container v-loading="isLoading">
<div>
<div class="providerOrderList-container">
<div class="d-f-j"
style="background: #f2f3f5">
<div>
<div class="name">订单信息</div>
</div>
<!-- <div class="name modify"
@click="basicModiy()">修改</div> -->
</div>
</div>
<div class="df"
style="margin-top: 20px">
<div class="df left">
<div>采购单号:</div>
<div>{{ datas.orderNum }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>客户名称:</div>
<div>{{ datas.customerId }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>计划采购:</div>
<div>{{ datas.plannedPurchase }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>入库数量:</div>
<div>{{ datas.bindNum }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>付费模式:</div>
<div>{{ datas.paymentModelValue }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>生产状态:</div>
<div>{{ datas.productionStateValue}}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>预计交货:</div>
<div>{{ datas.estimatedDeliveryTime }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>下单时间:</div>
<div>{{ datas.createTime }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>订单备注:</div>
<div>{{ datas.remark }}</div>
</div>
</div>
<div class="providerOrderList-container">
<div class="d-f-j"
style="background: #f2f3f5">
<div>
<div class="name">基本信息</div>
</div>
<!-- <div class="name modify"
@click="basicModiy()">修改</div> -->
</div>
</div>
<div class="df"
style="margin-top: 20px">
<div class="df left">
<div>产品名称:</div>
<div>{{ datas.productName }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>设备状态:</div>
<div>{{ datas.deviceStateValue }}</div>
</div>
</div>
<div class="df">
<div class="df left">
<div>产品类型:</div>
<div>{{ datas.productTypeValue }}</div>
</div>
<div class="df right"
style="margin-left: 170px">
<div>产品型号:</div>
<div>{{ datas.productModel }}</div>
</div>
</div>
</div>
</d2-container>
</template>
<script>
import { getOneOrderNum, modifyPws } from "@/libs/common/constant";
export default {
data() {
return {
isLoading: false,
datas: {},
isShow: true,
lunchTime: "",
dinnerTime: "",
imge: "",
openId: this.$route.params.id,
isShowImage: false,
img: "",
isModifyPassword: false,
};
},
async created() {
await this.getData();
},
methods: {
async getData() {
this.isLoading = true;
await this.getOneOrderNum(this.openId);
},
async getOneOrderNum(openId) {
const res = await this.$api.GET(`${getOneOrderNum.url}${openId}`);
this.datas = res;
this.isLoading = false;
console.log(res, "11");
},
lookImage(type) {
console.log(type);
if (type == "logo") {
this.img = this.datas.logImage;
// 这是logo
} else if (type == "license") {
// 这是营业执照
this.img = this.datas.businessImage;
}
this.isShowImage = true;
},
noShowImg() {
this.isShowImage = false;
},
async modifyPsw(data) {
const pages = {
loginName: this.datas.loginName,
supplierOpenId: this.openId,
loginPwd: data.password,
};
const res = await this.$api.POST(`${modifyPws.url}`, pages);
console.log(res, "修改结果");
this.isModifyPassword = false;
},
async noModify() {
this.isModifyPassword = false;
},
// 设置基本信息
basicModiy() {
this.$router.push({
path: `/basicModiy/${this.openId}`,
});
},
// 联系信息设置
contactModiy() {
this.$router.push({
path: `/contactModiy/${this.openId}`,
});
},
// 收款信息 设置
chargeModiy() {
this.$router.push({
path: `/chargeModiy/${this.openId}`,
});
},
// 商家介绍
lookIntroduce() {
this.$router.push({
path: `/businessIntroduce/${this.openId}`,
});
},
// 重置密码
resetting() {
this.isModifyPassword = true;
},
},
};
</script>
<style lang="scss" scoped>
.d-f-j {
display: flex;
justify-content: space-between;
}
.df {
display: flex;
}
.name {
height: 50px;
line-height: 50px;
margin-left: 10px;
}
.modify {
margin-right: 20px;
color: blue;
cursor: pointer;
}
.button {
margin-top: 20px;
margin-right: 10px;
}
.left {
width: 400px;
line-height: 40px;
margin-left: 30px;
}
.right {
line-height: 40px;
margin-right: 30px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment