From 42adf7605b0d7f272e1f26b22e5b92c00b293d80 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 22 三月 2024 15:35:52 +0800
Subject: [PATCH] 登录页面接口、订单管理列表页面接口先跟进aps项目接口联调及部分代码删减
---
vue.config.js | 16
src/store/index.js | 18
src/components/layout/components/appHeader/index.vue | 19
src/views/other/login/index.vue | 25
src/views/other/commonDialog/SelectCommonDialog.vue | 38 +-
src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue | 20
/dev/null | 558 -------------------------------
src/components/makepager/TableCommonView.vue | 1
src/common/untils/request.js | 73 ++--
src/api/common/other.js | 11
src/components/makepager/pager/mixin/pageMixin.js | 2
src/views/orderManageModule/orderManage/index.vue | 147 ++++++--
src/api/orderManageModule/orderManage.js | 73 ++++
src/views/other/commonDialog/EditDropdownDialog.vue | 49 --
14 files changed, 301 insertions(+), 749 deletions(-)
diff --git a/src/api/common/other.js b/src/api/common/other.js
index adf2e9d..c08f55c 100644
--- a/src/api/common/other.js
+++ b/src/api/common/other.js
@@ -13,4 +13,13 @@
method: "get",
params: data
})
-}
\ No newline at end of file
+}
+// 鑾峰彇浜у搧淇℃伅
+export const getMaterialList = (data) => {
+ return request({
+ url: "/api-s/v1/material/getMaterialList",
+ method: "post",
+ IsHeader: true,
+ data
+ })
+}
diff --git a/src/api/login/login.js b/src/api/login/login.js
deleted file mode 100644
index a02201a..0000000
--- a/src/api/login/login.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import request from "@/common/untils/request.js"
-
-// 鑾峰彇楠岃瘉鐮�
-export function getCaptcha() {
- return request({
- url: "/api/base/captcha",
- method: "post"
- })
-}
-
-// 鐧诲綍
-export function login(data) {
- return request({
- url: "/api/base/login",
- method: "post",
- data
- })
-}
diff --git a/src/api/orderManageModule/orderManage.js b/src/api/orderManageModule/orderManage.js
new file mode 100644
index 0000000..4f09a82
--- /dev/null
+++ b/src/api/orderManageModule/orderManage.js
@@ -0,0 +1,73 @@
+import request from "@/common/untils/request.js"
+
+/** 濮斿璁㈠崟 */
+// 濮斿璁㈠崟鍒楄〃
+export const outsourceOrderList = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/list",
+ method: "get",
+ params: data
+ })
+}
+
+// 濮斿璁㈠崟缁熻
+export const outsourceOrderOverview = () => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/overview",
+ method: "get"
+ })
+}
+
+// 濮斿璁㈠崟浜у搧鍒楄〃
+export const outsourceOrderProductList = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/productList",
+ method: "get",
+ params: data
+ })
+}
+
+// 濮斿浼佷笟渚涜揣鍘嗗彶
+export const outsourcenterpriseProductList = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/enterprise/productList",
+ method: "get",
+ params: data
+ })
+}
+
+// // 濮斿渚涘簲鍟�
+// export const orderAssign = (data) => {
+// return request({
+// url: "/api-s/v1/outsourcing/order/assign",
+// method: "post",
+// data
+// })
+// }
+
+// 淇濆瓨鐗╂枡鐢宠鍗�
+export const saveMaterialApply = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/saveMaterialApply",
+ method: "post",
+ data
+ })
+}
+
+// 鑾峰彇鐗╂枡鐢宠鍗�
+export const getMaterialApplyList = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/getMaterialApplyList",
+ method: "post",
+ data
+ })
+}
+
+// 淇敼鐘舵��
+export const changeOutsourceOrderStatus = (data) => {
+ return request({
+ url: "/api-s/v1/outsourcing/order/changeStatus",
+ method: "post",
+ data
+ })
+}
diff --git a/src/api/productManage/product.js b/src/api/productManage/product.js
deleted file mode 100644
index 4c60183..0000000
--- a/src/api/productManage/product.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import request from "@/common/untils/request.js"
-// import axios from "axios"
-
-// 浜у搧鍒楄〃
-// export const getProductList = async (data) => {
-// return await axios.get(`/api/p/getProductList`, {
-// params: data
-// })
-// }
-export function getProductList(data) {
- return request({
- url: "/api/p/getProductList",
- method: "get",
- params:data
- })
-}
-// 鏌ヨ鍗曟潯渚涘簲鍟嗘暟鎹�
-export function getSupplierByNumber(data) {
- return request({
- url: `/api/s/getSupplierByNumber/${data}`,
- method: "get",
- data
- })
-}
-// 鍒涘缓浜у搧
-export function createProduct(data) {
- return request({
- url: "/api/p/createProduct",
- method: "post",
- data
- })
-}
-// 鍒犻櫎浜у搧
-export function deleteProduct(data) {
- return request({
- url: "/api/p/deleteProduct",
- method: "delete",
- data
- })
-}
-// 鏇存柊浜у搧
-export function updateProduct(data) {
- return request({
- url: "/api/p/updateProduct",
- method: "put",
- data
- })
-}
-
-// 娣诲姞浜у搧鑾峰彇浜у搧鍒楄〃
-// export const getProductListFromGrpc = async (data) => {
-// return await axios.get(`/api/p/getProductListFromGrpc`, {
-// params: data
-// })
-// }
-export function getProductListFromGrpc(data) {
- return request({
- url: "/api/p/getProductListFromGrpc",
- method: "get",
- params:data
- })
-}
diff --git a/src/api/purchaseManage/purchase.js b/src/api/purchaseManage/purchase.js
deleted file mode 100644
index 37a8b1e..0000000
--- a/src/api/purchaseManage/purchase.js
+++ /dev/null
@@ -1,141 +0,0 @@
-import request from "@/common/untils/request.js"
-import axios from "axios"
-// 閿�鍞嚎绱㈠垪琛�
-export function getSalesLeadsList(data) {
- return request({
- url: "/api/salesLeads/list",
- method: "post",
- data
- })
-}
-// 娣诲姞閿�鍞嚎绱�
-export function getAddSalesLeads(data) {
- return request({
- url: "/api/salesLeads/add",
- method: "post",
- data
- })
-}
-// 鍒犻櫎閿�鍞嚎绱�
-export function getDeleteSalesLeads(data) {
- return request({
- url: "/api/salesLeads/delete",
- method: "delete",
- data
- })
-}
-// 鏇存柊閿�鍞嚎绱�
-export function getUpdateSalesLeads(data) {
- return request({
- url: "/api/salesLeads/update",
- method: "put",
- data
- })
-}
-
-// 鎺ㄨ繘閿�鍞嚎绱�
-export function pushSalesSources(data) {
- return request({
- url: "/api/salesLeads/push",
- method: "post",
- data
- })
-}
-
-// 鍟嗘満鏉ユ簮鍒楄〃
-export function getSalesSourcesList() {
- return request({
- url: "/api/salesSources/list",
- method: "get"
- })
-}
-// 閲囪喘鍗曞垪琛�
-// export const getPurchaseList = async (data) => {
-// return await axios.get(`/api/purchase/purchaseList`, {
-// params: data
-// })
-// }
-export function getPurchaseList(data) {
- return request({
- url: "/api/purchase/purchaseList",
- method: "get",
- params: data
- })
-}
-// 鍒涘缓閲囪喘鍗�
-export function addPurchase(data) {
- return request({
- url: "/api/purchase/purchase",
- method: "post",
- data
- })
-}
-// 鏇存柊閲囪喘鍗�
-export function updatePurchase(data) {
- return request({
- url: "/api/purchase/purchase",
- method: "put",
- data
- })
-}
-// 鑾峰彇閲囪喘鍗曚俊鎭�
-export function getPurchaseInfo(data) {
- return request({
- url: "/api/purchase/purchase/" + data.id,
- method: "get",
- data
- })
-}
-// 鍒犻櫎閲囪喘鍗曚俊鎭�
-export function deletePurchase(data) {
- return request({
- url: "/api/purchase/purchase/" + data.id,
- method: "delete",
- data
- })
-}
-// 鎻愪氦閲囪喘鍗�
-export function submitPurchase(data) {
- return request({
- url: "/api/purchase/submit",
- method: "post",
- data
- })
-}
-// 鏂板缓閲囪喘绫诲瀷
-export function savePurchaseType(data) {
- return request({
- url: "/api/purchase/purchaseType",
- method: "post",
- data
- })
-}
-// 鑾峰彇閲囪喘绫诲瀷
-export function getPurchaseType(data) {
- return request({
- url: "/api/purchase/purchaseTypeList",
- method: "get",
- data
- })
-}
-// 璐ㄦ鍒楄〃
-export const qualityInspectList = async (data) => {
- return await axios.get(`/api/purchase/qualityInspectList`, {
- params: data
- })
-}
-// 鑾峰彇浠撳簱鍒楄〃
-export function getWarehouseInfo() {
- return request({
- url: "/api/purchase/getWarehouseInfo/",
- method: "get"
- })
-}
-// 鑾峰彇浜у搧/鏀惰揣淇℃伅
-export function getOperationInfo(data) {
- return request({
- url: "/api/purchase/getOperationInfo/" + data.id,
- method: "get",
- data
- })
-}
diff --git a/src/api/supplierManage/supplier.js b/src/api/supplierManage/supplier.js
deleted file mode 100644
index df43251..0000000
--- a/src/api/supplierManage/supplier.js
+++ /dev/null
@@ -1,123 +0,0 @@
-import request from "@/common/untils/request.js"
-// import axios from "axios"
-
-// 鏈嶅姟鍟嗗垪琛�
-export function getSupplierList(data) {
- return request({
- url: "/api/s/getSupplierList",
- method: "get",
- params: data
- })
-}
-// 鍒涘缓鏈嶅姟鍟�
-export function createSupplier(data) {
- return request({
- url: "/api/s/createSupplier",
- method: "post",
- data
- })
-}
-// 鍒犻櫎鏈嶅姟鍟�
-export function deleteSupplier(data) {
- return request({
- url: "/api/s/deleteSupplier",
- method: "delete",
- data
- })
-}
-// 鏇存柊鏈嶅姟鍟�
-export function updateSupplier(data) {
- return request({
- url: "/api/s/updateSupplier",
- method: "put",
- data
- })
-}
-// 淇敼鏈嶅姟鍟嗙姸鎬�
-export function changeSupplierStatus(data) {
- return request({
- url: "/api/s/changeSupplierStatus",
- method: "post",
- data
- })
-}
-// 鐢╥d鏌ヨ鏈嶅姟鍟�
-export function findSupplier(data) {
- return request({
- url: "/api/s/findSupplier",
- method: "get",
- params: data
- })
-}
-
-// 鏇存柊鏈嶅姟鍟嗙被鍨�
-export function updateSupplierType(data) {
- return request({
- url: "/api/st/updateSupplierType",
- method: "put",
- data
- })
-}
-// 鏈嶅姟鍟嗙被鍨嬪垪琛�
-export function getSupplierTypeList(data) {
- return request({
- url: "/api/st/getSupplierTypeList",
- method: "get",
- params: data
- })
-}
-
-// 涓婁紶鍚堝悓
-// export const createContract = async (data) => {
-// return await axios.post(`/api/con/createContract`, data, {
-// headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" }
-// })
-// }
-export function createContract(data) {
- return request({
- url: "/api/con/createContract",
- method: "post",
- data
- })
-}
-// 鍒犻櫎鍚堝悓
-export function deleteContract(data) {
- return request({
- url: "/api/con/deleteContract",
- method: "delete",
- data
- })
-}
-// 棰勮鍚堝悓
-export function previewContract(data) {
- return request({
- url: "/api/con/previewContract",
- method: "get",
- params: data
- })
-}
-// 涓嬭浇鍚堝悓
-export function downloadContract(data) {
- return request({
- url: "/api/downloadContract",
- method: "get",
- params: data
- })
-}
-
-// 鏇存柊鎵�灞炶涓�
-export function updateIndustry(data) {
- return request({
- url: "/api/i/updateIndustry",
- method: "put",
- data
- })
-}
-// 鎵�灞炶涓氬垪琛�
-export function getIndustryList(data) {
- return request({
- url: "/api/i/getIndustryList",
- method: "get",
- params: data
- })
-}
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 1c10074..4541c17 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -3,21 +3,21 @@
// import router from '@/router'
// 寮�鍙戠幆澧冧笅灏嗚嚜宸辩殑token澶嶅埗鍒拌繖閲�, 涔熷彲浠ュ湪娴忚鍣ㄤ腑鎵嬪姩娣诲姞token鍒癱ookie涓�,cookie涓殑token浼樺厛
-const DEV_TOKEN = ''
-function environmentType(){
+const DEV_TOKEN = ""
+function environmentType() {
let type
- if (location.href.includes('192.168.20.119')) {
- type = 'test'
- } else if (location.href.includes('192.168') || location.href.includes('localhost')) {
- type = 'dev'
+ if (location.href.includes("192.168.20.119")) {
+ type = "test"
+ } else if (location.href.includes("192.168") || location.href.includes("localhost")) {
+ type = "dev"
} else {
- type = 'prod'
+ type = "prod"
}
return type
}
-const isDev = environmentType() === 'dev'
+const isDev = environmentType() === "dev"
const Axios = axios.create({
responseType: "json",
@@ -26,9 +26,9 @@
const getApsPage = () => {
// 棣栭〉閮ㄧ讲鍦ㄥ悇涓幆澧冪殑绔彛
const loginPathMap = {
- prod:`//${window.location.hostname}:9080`,
- test:`//192.168.20.119:9080`,
- dev: `//192.168.8.107:8080`
+ prod: `//${window.location.hostname}:9080`,
+ test: `//192.168.20.119:9080`,
+ dev: `//192.168.8.107:8080`
}
return loginPathMap[environmentType()]
}
@@ -41,15 +41,13 @@
// // if (token != undefined) {
// // config.headers.Authorization = "Bearer " + token;
// // }
- let token = document.cookie.replace(
- /(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/,
- "$1",
- );
- if (isDev){
+ // let token = localStorage.getItem("token")
+ let token = document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1")
+ if (isDev) {
token = token || DEV_TOKEN
}
if (token) {
- config.headers.Authorization = "Bearer " + token;
+ config.headers.Authorization = "Bearer " + token
}
return config
},
@@ -61,16 +59,17 @@
/* //杩斿洖鐘舵�佸垽鏂�(娣诲姞鍝嶅簲鎷︽埅鍣�) */
Axios.interceptors.response.use(
(res) => {
+ console.log("99999", res)
/* //瀵瑰搷搴旀暟鎹仛浜涗簨 */
if (res.data.code === 200) {
return res.data ? res.data : {}
- } else if([2012,2013,2014,2015].includes(res.data.code)){
- if (isDev){
+ } else if ([2012, 2013, 2014, 2015].includes(res.data.code)) {
+ if (isDev) {
alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
- window.location = getApsPage()+'/login'
- }else {
+ window.location = getApsPage() + "/login"
+ } else {
// JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
- window.location = getApsPage()+'/login'
+ window.location = getApsPage() + "/login"
}
// Message({
// message: res.data.msg,
@@ -78,30 +77,32 @@
// duration: 5 * 1000
// })
return Promise.reject(res.data)
- }else if([2036].includes(res.data.code)){
- if (isDev){
- window.location = getApsPage()+'/commonWeb?resetPwd=true'
- }else {
+ } else if ([2036].includes(res.data.code)) {
+ if (isDev) {
+ window.location = getApsPage() + "/commonWeb?resetPwd=true"
+ } else {
// JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
- window.location = getApsPage()+'/commonWeb?resetPwd=true'
+ window.location = getApsPage() + "/commonWeb?resetPwd=true"
}
return Promise.reject(res.data)
// if(window.location.pathname && window.location.pathname !== '/login'){
// window.location = window.location.origin+'/login'
// }
+ } else {
+ return res.data ? res.data : {}
}
},
(error) => {
- if(error.response.status === 401){
- if (isDev){
- alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
- window.location = getApsPage()+'/login'
- }else {
- // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
- window.location = getApsPage()+'/login'
- }
- }
+ // if (error.response.status === 401) {
+ // if (isDev) {
+ // alert("JWT澶辨晥,鍗冲皢璺宠浆鑷崇櫥褰曢〉..")
+ // window.location = getApsPage() + "/login"
+ // } else {
+ // // JWT閴存潈澶辨晥 璺宠浆鍒扮櫥褰曢〉
+ // window.location = getApsPage() + "/login"
+ // }
+ // }
let { message } = error
if (message === "Network Error") {
message = "鍚庣鎺ュ彛杩炴帴寮傚父"
diff --git a/src/components/layout/components/appHeader/index.vue b/src/components/layout/components/appHeader/index.vue
index 6b8c015..d1c5c8a 100644
--- a/src/components/layout/components/appHeader/index.vue
+++ b/src/components/layout/components/appHeader/index.vue
@@ -18,7 +18,6 @@
</template>
<script>
-import Cookies from "js-cookie"
import UpdatePassWord from "./components/updatePassWord"
export default {
name: "SalesLead",
@@ -38,17 +37,14 @@
}
},
created() {
- const userObj = Cookies.get("userObj")
- if (userObj) {
- let userInfo = JSON.parse(userObj)
- this.editConfig.userId = userInfo.id
- this.username = userInfo.nickName
- } else {
- console.log("Object not found in cookie")
- }
+ console.log(localStorage, "dddd")
},
mounted() {
// this.username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")
+ console.log(localStorage, "mounted")
+ console.log(localStorage)
+ this.editConfig.userId = localStorage.getItem("uuid")
+ this.username = localStorage.getItem("username")
},
methods: {
environmentType() {
@@ -83,9 +79,12 @@
type: "warning"
})
.then(() => {
- Cookies.remove("token")
+ // Cookies.remove("token")
// window.location.href = 'http://localhost:8080/login'; //鏈湴鐨勬櫤鎱у伐鍘�-鐧诲綍椤�
// window.location.href = "http:" + this.getApsPage() + "/login"
+ localStorage.removeItem("token")
+ localStorage.removeItem("uuid")
+ localStorage.removeItem("username")
// 璺宠浆璺敱
this.$router.push({ path: "/login" })
this.$message({
diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index 047b4b5..bbf8139 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -22,6 +22,7 @@
<el-table-column v-if="tableList.selectBox" type="selection" width="40" :selectable="selectable">
</el-table-column>
<el-table-column v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50"></el-table-column>
+ <slot name="tableLeft" />
<el-table-column
v-for="(item, i) in tableList.tableColumn"
:key="i"
diff --git a/src/components/makepager/pager/mixin/pageMixin.js b/src/components/makepager/pager/mixin/pageMixin.js
index 3e2e54e..ad77eda 100644
--- a/src/components/makepager/pager/mixin/pageMixin.js
+++ b/src/components/makepager/pager/mixin/pageMixin.js
@@ -7,7 +7,7 @@
return {
pagerOptions: {
currPage: 1,
- pageSize: 10,
+ pageSize: 15,
totalCount: 0
},
pagerEvents
diff --git a/src/store/index.js b/src/store/index.js
index 2ed9e57..cbf41f0 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,23 +1,21 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import getSupplierName from "./modules/getSupplierName"
+import Vue from "vue"
+import Vuex from "vuex"
+// import getSupplierName from "./modules/getSupplierName"
Vue.use(Vuex)
export default new Vuex.Store({
state: {
- menus:[],
+ menus: []
},
- getters: {
- },
+ getters: {},
mutations: {
- setMenus(state,payload){
+ setMenus(state, payload) {
state.menus = payload
}
},
- actions: {
- },
+ actions: {},
modules: {
- getSupplierName
+ // getSupplierName
}
})
diff --git a/src/store/modules/getSupplierName.js b/src/store/modules/getSupplierName.js
deleted file mode 100644
index 897d522..0000000
--- a/src/store/modules/getSupplierName.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { getSupplierList } from "@/api/supplierManage/supplier"
-import { Message } from "element-ui"
-
-export default{
- state:{
- supplierList:[], //渚涘簲鍟嗗垪琛�
- },
- mutations:{
- supplierNameList(state, payload) {
- state.supplierList = payload
- },
- },
- actions:{
- getSupplier(context){
- getSupplierList({page:1,pageSize:100,status:1}).then((res) => {
- if (res.code == 200) {
- context.commit("supplierNameList", res.data.list)
- } else {
- Message.error(res.msg)
- }
- })
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue b/src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue
index f8681db..55e12eb 100644
--- a/src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue
+++ b/src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue
@@ -67,7 +67,7 @@
<el-table-column prop="materialName" show-overflow-tooltip label="浜у搧鍚嶇О"> </el-table-column>
</template>
<template slot="tableButton">
- <el-table-column prop="amount" label="鏁伴噺" min-width="110">
+ <el-table-column prop="amount" label="鏁伴噺">
<template slot-scope="scope">
<el-input
style="width: 100%"
@@ -123,7 +123,7 @@
</template>
<script>
-// import { saveMaterialApply } from "@/api/outsourceEnterpriseManage/index"
+import { saveMaterialApply } from "@/api/orderManageModule/orderManage"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
export default {
name: "AddSalesDetailsDialog",
@@ -321,14 +321,14 @@
const params = this.saveParams()
console.log(params)
this.isAddloading = true
- // saveMaterialApply(params).then((res) => {
- // if (res.code === 200) {
- // this.editRow.visible = false
- // this.$message.success(this.editRow.title + "鎴愬姛锛�")
- // this.$emit("reRreshData")
- // }
- // this.isAddloading = false
- // })
+ saveMaterialApply(params).then((res) => {
+ if (res.code === 200) {
+ this.editRow.visible = false
+ this.$message.success(this.editRow.title + "鎴愬姛锛�")
+ this.$emit("reRreshData")
+ }
+ this.isAddloading = false
+ })
},
saveParams() {
let commonParam = {
diff --git a/src/views/orderManageModule/orderManage/index.vue b/src/views/orderManageModule/orderManage/index.vue
index b915842..95eb7d0 100644
--- a/src/views/orderManageModule/orderManage/index.vue
+++ b/src/views/orderManageModule/orderManage/index.vue
@@ -29,7 +29,10 @@
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="160" fixed="right">
<template slot-scope="scope">
- <el-button v-if="scope.row.status == 0" type="text" size="small">寰呯‘璁�</el-button>
+ <template v-if="scope.row.status == 1">
+ <el-button type="text" size="small">纭</el-button>
+ <el-button type="text" size="small">鍙栨秷</el-button>
+ </template>
<el-button
v-else-if="scope.row.status == 2 || scope.row.status == 4"
type="text"
@@ -125,6 +128,13 @@
</template>
<script>
+import {
+ outsourceOrderList,
+ outsourceOrderOverview,
+ outsourceOrderProductList,
+ getMaterialApplyList
+ // changeOutsourceOrderStatus
+} from "@/api/orderManageModule/orderManage"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import ApplyMaterialsDialog from "@/views/orderManageModule/orderManage/components/ApplyMaterialsDialog"
import DeliveryDialog from "@/views/orderManageModule/orderManage/components/DeliveryDialog"
@@ -155,10 +165,10 @@
tableList: {},
tableColumn: [
{ label: "璁㈠崟缂栧彿", prop: "number", min: 90, default: true },
- { label: "浜у搧鏁伴噺", prop: "quotationName", min: 120 },
- { label: "绛剧害鏃ユ湡", prop: "validity_date", min: 100 },
- { label: "浜や粯鏃ユ湡", prop: "client_name", min: 120 },
- { label: "鐘舵��", prop: "quotationStatus", isCallMethod: true, getCallMethod: this.getStatus }
+ { label: "浜у搧鏁伴噺", prop: "productQuantity", min: 120 },
+ { label: "绛剧害鏃ユ湡", prop: "signTime", min: 100 },
+ { label: "浜や粯鏃ユ湡", prop: "deliveryDate", min: 120 },
+ { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getStatus }
],
showCol: ["璁㈠崟缂栧彿", "浜у搧鏁伴噺", "绛剧害鏃ユ湡", "浜や粯鏃ユ湡", "鐘舵��"],
selectRow: {},
@@ -168,32 +178,32 @@
bottomTwoTableList2: {},
bottomTwoTableList3: {},
productColumn: [
- { label: "浜у搧鍚嶇О", prop: "number", min: 90, default: true },
- { label: "浜у搧缂栧彿", prop: "quotationName", min: 120 },
- { label: "Bom缂栧彿", prop: "validity_date", min: 100 },
- { label: "浜у搧瑙勬牸", prop: "client_name", min: 120 },
- { label: "浜у搧鏁伴噺", prop: "quotationStatus" },
- { label: "鍗曚綅", prop: "client_name", min: 120 }
+ { label: "浜у搧鍚嶇О", prop: "productName", min: 90, default: true },
+ { label: "浜у搧缂栧彿", prop: "productId", min: 120 },
+ { label: "Bom缂栧彿", prop: "bomID", min: 100 },
+ { label: "浜у搧瑙勬牸", prop: "specs", min: 120 },
+ { label: "浜у搧鏁伴噺", prop: "amount" },
+ { label: "鍗曚綅", prop: "unit", min: 120 }
],
showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "Bom缂栧彿", "浜у搧瑙勬牸", "浜у搧鏁伴噺", "鍗曚綅"],
materialRquestColumn: [
- { label: "浜у搧鍚嶇О", prop: "number", min: 90, default: true },
- { label: "浜у搧缂栧彿", prop: "quotationName", min: 120 },
- { label: "浜у搧鏁伴噺", prop: "validity_date", min: 100 },
- { label: "浜у搧瑙勬牸", prop: "client_name", min: 120 },
- { label: "浜у搧鍨嬪彿", prop: "quotationStatus" },
- { label: "鍗曚綅", prop: "client_name", min: 120 }
+ { label: "浜у搧鍚嶇О", prop: "materialName", min: 90, default: true },
+ { label: "浜у搧缂栧彿", prop: "materialNumber", min: 120 },
+ { label: "浜у搧鏁伴噺", prop: "amount", min: 100 },
+ { label: "浜у搧瑙勬牸", prop: "specs", min: 120 },
+ { label: "浜у搧鍨嬪彿", prop: "type" },
+ { label: "鍗曚綅", prop: "unit", min: 120 }
],
showMaterialRquestCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "浜у搧鏁伴噺", "浜у搧瑙勬牸", "浜у搧鍨嬪彿", "鍗曚綅"],
deliveryRquestColumn: [
{ label: "鍙戣揣鍗曞彿", prop: "number", default: true },
- { label: "浜у搧鍚嶇О", prop: "number", default: true },
- { label: "浜у搧缂栧彿", prop: "quotationName" },
- { label: "璁㈠崟鏁伴噺", prop: "validity_date" },
+ { label: "浜у搧鍚嶇О", prop: "productName", default: true },
+ { label: "浜у搧缂栧彿", prop: "productId" },
+ { label: "璁㈠崟鏁伴噺", prop: "amount" },
{ label: "鍙戣揣鏁伴噺", prop: "validity_date" },
- { label: "浜у搧瑙勬牸", prop: "client_name" },
- { label: "浜у搧鍨嬪彿", prop: "quotationStatus" },
- { label: "鍗曚綅", prop: "client_name" },
+ { label: "浜у搧瑙勬牸", prop: "specs" },
+ { label: "浜у搧鍨嬪彿", prop: "model" },
+ { label: "鍗曚綅", prop: "unit" },
{ label: "杩愬崟鍙�", prop: "validity_date" },
{ label: "鎵胯繍鍟�", prop: "validity_date" },
{ label: "鍒涘缓鏃堕棿", prop: "client_name", min: 100 }
@@ -220,22 +230,88 @@
visible: false,
title: "鍙戣揣",
infomation: {}
+ },
+ searchParam: {
+ keyword: "",
+ page: 1,
+ pageSize: 15
}
}
},
created() {
this.setTable()
+ this.getData()
},
methods: {
reRreshData() {
this.getData()
+ },
+ // 鑾峰彇top璁㈠崟鍒楄〃鏁版嵁
+ async getData() {
+ this.searchParam.page = this.pagerOptions.currPage
+ this.searchParam.pageSize = this.pagerOptions.pageSize
+ let rsp = await outsourceOrderList(this.searchParam)
+ let list = rsp
+ console.log(list)
+ if (list && list.code == 200) {
+ this.tableList.tableInfomation = list.data
+ this.pagerOptions.totalCount = list.total
+ if (list.total > 0) {
+ this.selectRow = list.data[0]
+ this.getProductListMethod(list.data[0].id)
+ }
+ this.overview()
+ }
+ },
+ // 鑾峰彇浜у搧淇℃伅
+ getProductListMethod(id) {
+ outsourceOrderProductList({ outsourcingOrderId: id }).then((res) => {
+ console.log(res)
+ if (res.code == 200) {
+ this.bottomTwoTableList1.tableInfomation = res.data
+ }
+ })
+ },
+ // 鑾峰彇鐗╂枡鐢宠鍗�
+ getMaterialApplyList(number) {
+ getMaterialApplyList({ number: number, page: 1, pageSize: 15 }).then((res) => {
+ console.log(res)
+ if (res.code == 200) {
+ this.bottomTwoTableList2.tableInfomation = res.data
+ }
+ })
+ },
+ overview() {
+ outsourceOrderOverview().then((reply) => {
+ this.totalObject.value = reply.data.total || 0
+ this.otherOptions.map((item) => {
+ if (item.label === "寰呭垎閰�") {
+ item.value = reply.data.waitAssigned
+ } else if (item.label === "宸插垎閰�") {
+ item.value = reply.data.hasAssigned
+ }
+ })
+ })
},
addCommonClick() {
alert("闇茶タ666")
},
searchClick() {},
onFilterSearch() {},
- tableRowClick() {},
+ tableRowClick(row, column, event) {
+ console.log(row, column, event)
+ this.selectRow = row
+ if (this.activeNameBottom == 1) {
+ this.getProductListMethod(this.selectRow.id)
+ } else {
+ this.getMaterialApplyList(this.selectRow.number)
+ }
+ },
+ tableRowClassName({ row }) {
+ if (row.id == this.selectRow.id) {
+ return "onSelect"
+ }
+ },
getSelectArray() {},
// 鐢宠鐗╂枡
applyClick(row) {
@@ -257,22 +333,17 @@
},
tabClickBottom(activeNameBottom) {
this.activeNameBottom = activeNameBottom
- // if (activeNameBottom == 1) {
- // this.getProductListMethod(this.selectRow.id);
- // } else {
- // this.getMaterialApplyList(this.selectRow.number);
- // }
+ if (activeNameBottom == 1) {
+ this.getProductListMethod(this.selectRow.id)
+ } else {
+ this.getMaterialApplyList(this.selectRow.number)
+ }
},
setTable() {
this.tableList = {
selectIndex: true,
selectBox: true,
- tableInfomation: [
- {
- number: "1111",
- status: 4
- }
- ],
+ tableInfomation: [],
allcol: [],
showcol: this.showCol,
tableColumn: this.setColumnVisible(this.showCol, this.tableColumn)
@@ -354,10 +425,8 @@
},
// 鐘舵��
getStatus(val) {
- return val === 0
- ? "寰呭垎閰�"
- : val === 1
- ? "宸插垎閰�"
+ return val === 1
+ ? "寰呯‘璁�"
: val === 2
? "寰呯敓浜�"
: val === 3
diff --git a/src/views/other/commonDialog/EditDropdownDialog.vue b/src/views/other/commonDialog/EditDropdownDialog.vue
index e67830f..b72f925 100644
--- a/src/views/other/commonDialog/EditDropdownDialog.vue
+++ b/src/views/other/commonDialog/EditDropdownDialog.vue
@@ -55,7 +55,7 @@
</template>
<script>
-import { getSupplierTypeList, updateSupplierType, updateIndustry, getIndustryList } from "@/api/supplierManage/supplier"
+// import { getSupplierTypeList, updateSupplierType, updateIndustry, getIndustryList } from "@/api/supplierManage/supplier"
export default {
name: "EditDropdownDialog",
props: {
@@ -95,26 +95,7 @@
this.getIndustryList()
}
},
- // 渚涘簲鍟嗙被鍨�
- async getSupplierTypeList() {
- await getSupplierTypeList({
- page: 1,
- pageSize: 100
- }).then((res) => {
- console.log(res.data)
- this.tableData = res.data.list
- })
- },
- // 鎵�灞炶涓�
- async getIndustryList() {
- await getIndustryList({
- page: 1,
- pageSize: 100
- }).then((res) => {
- console.log(res.data)
- this.tableData = res.data.list
- })
- },
+
handleClose() {
this.editConfig.editVisible = false
},
@@ -186,29 +167,9 @@
ite.ID = 0
return { ...ite }
})
- if (this.editConfig.title === "渚涘簲鍟嗙被鍨�") {
- updateSupplierType({
- supplierTypes: this.tableData
- }).then((res) => {
- console.log(res)
- if (res.code === 200) {
- this.$message.success("缂栬緫鎴愬姛")
- this.$parent.getSupplierTypeList()
- this.handleClose()
- }
- })
- } else if (this.editConfig.title === "鎵�灞炶涓�") {
- updateIndustry({
- industries: this.tableData
- }).then((res) => {
- console.log(res)
- if (res.code === 200) {
- this.$message.success("缂栬緫鎴愬姛")
- this.$parent.getIndustryList()
- this.handleClose()
- }
- })
- }
+ // if (this.editConfig.title === "渚涘簲鍟嗙被鍨�") {
+ // } else if (this.editConfig.title === "鎵�灞炶涓�") {
+ // }
}
}
}
diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 30137a5..27e8e4b 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -50,7 +50,7 @@
</template>
<script>
-// import { postGetMaterialList } from "@/api/ProductiveTask/productBom"
+import { getMaterialList } from "@/api/common/other"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "EditSelCommonDialog",
@@ -85,8 +85,7 @@
bomParams: {
keyword: "",
page: 1,
- pageSize: 10,
- types: ["鍘熸潗鏂�", "鍗婃垚鍝�", "鎴愬搧"]
+ pageSize: 10
}
}
},
@@ -125,7 +124,6 @@
{
label: "浜у搧缂栫爜",
prop: "id",
- min: 110,
isShowColumn: true,
default: true
},
@@ -138,7 +136,6 @@
{
label: "浜у搧鍨嬪彿",
prop: "type",
- width: 90,
isShowColumn: showcol.includes("浜у搧鍨嬪彿"),
default: false
}
@@ -166,21 +163,22 @@
},
// 浜у搧鍚嶇О
async getProductList() {
- this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1
- this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15
- // let params = JSON.parse(JSON.stringify(this.bomParams))
- // await postGetMaterialList(params).then((res) => {
- // console.log(res.data)
- // if (res.code === 200) {
- // if (res.data) {
- // this.tableList.tableInfomation = res.data || []
- // this.pagerOptions.totalCount = res.total ? res.total : 0
- // } else {
- // this.tableList.tableInfomation = []
- // }
- // }
- // this.loading = false
- // })
+ // this.bomParams.page = this.pagerOptions.currPage ? this.pagerOptions.currPage : 1
+ // this.bomParams.pageSize = this.pagerOptions.pageSize ? this.pagerOptions.pageSize : 15
+ let params = JSON.parse(JSON.stringify(this.bomParams))
+ console.log(params)
+ await getMaterialList(params).then((res) => {
+ console.log(res.data)
+ if (res.code === 200) {
+ if (res.data) {
+ this.tableList.tableInfomation = res.data || []
+ this.pagerOptions.totalCount = res.total ? res.total : 0
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ }
+ this.loading = false
+ })
},
handleClose() {
this.editConfig.editVisible = false
diff --git a/src/views/other/login/index.vue b/src/views/other/login/index.vue
index 794c981..0d8cfde 100644
--- a/src/views/other/login/index.vue
+++ b/src/views/other/login/index.vue
@@ -148,28 +148,25 @@
this.$refs.loginForm.validate((valid) => {
if (valid) {
// 鐧诲綍
- // 娉ㄦ剰 杩欓噷鐨勬紨绀烘病鏈変紶楠岃瘉鐮�
- // 鍏蜂綋闇�瑕佷紶閫掔殑鏁版嵁璇疯嚜琛屼慨鏀逛唬鐮�
login({
username: this.formLogin.username,
password: this.formLogin.password,
captcha: this.formLogin.code,
captchaId: this.captchaId
- }).then((rsp) => {
- // 閲嶅畾鍚戝璞′笉瀛樺湪鍒欒繑鍥為《灞傝矾寰�
- if (rsp != "") {
- // this.$message.warning(rsp);
- this.error = "濉叆淇℃伅閿欒锛岃妫�鏌ワ紒"
- let _this = this
- setTimeout(function () {
- _this.error = ""
- }, 3000)
- if (rsp.indexOf("楠岃瘉鐮侀敊璇�") > -1) {
+ }).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("鐧诲綍鎴愬姛")
+ this.$router.push({ path: "/orderManageModule/orderManage" })
+ localStorage.setItem("token", res.data.token)
+ localStorage.setItem("username", res.data.user.username)
+ localStorage.setItem("uuid", res.data.user.id)
+ } else {
+ this.$message.warning(res.msg)
+ if (res.msg == "楠岃瘉鐮侀敊璇�") {
this.getCaptchaData()
}
- return
}
- this.$router.push({ path: "/commonWeb" })
+ console.log(res, "dddd")
})
} else {
// 鐧诲綍琛ㄥ崟鏍¢獙澶辫触
diff --git a/src/views/productManage/index.vue b/src/views/productManage/index.vue
deleted file mode 100644
index 08dd95e..0000000
--- a/src/views/productManage/index.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-<template>
- <router-view />
-</template>
-
-<script>
-export default {
- name: "CustomM",
- props: {}
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-//.content {
-// width: 100%;
-// background-color: #fff;
-// height: calc(100vh - 70px);
-//}
-</style>
diff --git a/src/views/productManage/product/AddProduct.vue b/src/views/productManage/product/AddProduct.vue
deleted file mode 100644
index 653b479..0000000
--- a/src/views/productManage/product/AddProduct.vue
+++ /dev/null
@@ -1,413 +0,0 @@
-<template>
- <div class="add-common">
- <el-dialog
- :title="addCommonConfig.title + '浜у搧'"
- :visible.sync="editConfig.visible"
- :width="dialogWidth"
- :before-close="handleClose"
- :close-on-click-modal="false"
- append-to-body
- custom-class="iframe-dialog"
- >
- <el-form
- ref="form"
- :model="editConfig.infomation"
- :rules="rules"
- label-position="right"
- label-width="308px"
- size="mini"
- >
- <!-- 淇℃伅 -->
- <div class="basic-info">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info-title">鍩烘湰淇℃伅</div>
- <div class="basic-info-view">
- <el-row>
- <el-col :span="12">
- <el-form-item label="浜у搧缂栧彿" prop="number">
- <el-input v-model="editConfig.infomation.number"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="浜у搧鍚嶇О" prop="product_name">
- <el-input v-model="editConfig.infomation.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="浜у搧绫诲埆" prop="supplierType_id">
- <div class="custom-name">
- <el-select
- v-model="editConfig.infomation.supplierType_id"
- placeholder="璇烽�夋嫨浜у搧绫诲埆"
- class="common-select-sel"
- size="mini"
- >
- <el-option v-for="item in supplierTypeOptions" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- <div class="common-select-btn" @click="setProductType"><i class="el-icon-setting"></i></div>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟�" prop="supplier_name">
- <div class="custom-name">
- <el-autocomplete
- v-model="editConfig.infomation.supplier_name"
- :fetch-suggestions="querySearchAsync"
- value-key="name"
- @select="handleSelectClient"
- ></el-autocomplete>
- <div class="common-select-btn" @click="selClientClick">
- <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
- </div>
- <div class="common-select-btn" @click="clearupClient">
- <i class="el-icon-edit-outline" title="娓呴櫎"></i>
- </div>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="瑙勬牸" prop="supplier_name">
- <el-input v-model="editConfig.infomation.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍨嬪彿" prop="supplier_name">
- <el-input v-model="editConfig.infomation.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍗曚綅" prop="industry_id">
- <div class="custom-name">
- <el-select
- v-model="editConfig.infomation.industry_id"
- placeholder="璇烽�夋嫨渚涘簲鍟嗚涓�"
- class="common-select-sel"
- size="mini"
- >
- <el-option v-for="item in industryOptions" :key="item.id" :label="item.name" :value="item.id">
- </el-option>
- </el-select>
- <div class="common-select-btn" @click="setUnit"><i class="el-icon-setting"></i></div>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="浠锋牸" prop="amount">
- <el-input-number
- v-model="editConfig.infomation.amount"
- placeholder="璇疯緭鍏�"
- :min="0"
- :precision="2"
- :controls="false"
- style="width: 100%; margin-right: 5px"
- ></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏈�浣庡簱瀛�" prop="phone">
- <el-input-number
- v-model="editConfig.infomation.projected_amount"
- placeholder="璇疯緭鍏�"
- :min="0"
- :controls="false"
- style="width: 100%; margin-right: 5px"
- ></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏈�楂樺簱瀛�" prop="phone">
- <el-input-number
- v-model="editConfig.infomation.projected_amount"
- placeholder="璇疯緭鍏�"
- :min="0"
- :controls="false"
- style="width: 100%; margin-right: 5px"
- ></el-input-number>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍥剧墖" prop="phone">
- <div class="bigImg-div" @click="toGetImg">
- <i class="el-icon-plus icon" v-if="!valueUrl"></i>
- <img class="bigImg" :src="valueUrl" v-if="valueUrl" />
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="澶囨敞淇℃伅" prop="desc">
- <el-input
- type="textarea"
- :autosize="{ minRows: 2, maxRows: 4 }"
- placeholder="璇疯緭鍏ュ唴瀹�"
- v-model="editConfig.infomation.desc"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" size="small" @click="saveClick('form')">淇� 瀛�</el-button>
- <el-button size="small" @click="editConfig.visible = false">鍙� 娑�</el-button>
- </div>
- </el-dialog>
- <!-- 缂栬緫涓嬫媺妗� -->
- <EditDropdownDialog v-if="editDropdownConfig.editVisible" :edit-dropdown-config="editDropdownConfig" />
- </div>
-</template>
-
-<script>
-let inputElement = null
-import EditDropdownDialog from "@/views/other/commonDialog/EditDropdownDialog"
-export default {
- name: "AddProductDialog",
- props: {
- addCommonConfig: {
- type: Object,
- default: () => {
- return {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- }
- }
- }
- },
- components: { EditDropdownDialog },
- computed: {},
- data() {
- return {
- dialogWidth: "80%",
- editConfig: this.addCommonConfig,
- rules: {
- supplier_name: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- product_name: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }]
- },
- supplierTypeOptions: [], // 渚涘簲鍟嗙被鍨�
- industryOptions: [], // 鎵�灞炶涓�
- memberOptions: [],
- editDropdownConfig: {
- editVisible: false,
- title: "",
- infomation: {}
- },
- supplierId: this.addCommonConfig.infomation.supplierId,
- valueUrl: ""
- }
- },
- created() {
- if (this.editConfig.title !== "鏂板缓" && this.editConfig.infomation.province_id !== 0) {
- this.getCityList(this.editConfig.infomation.province_id, "edit")
- }
- },
- methods: {
- handleClose() {
- this.editConfig.visible = false
- },
- // 淇濆瓨
- saveClick(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- console.log(this.editConfig.infomation)
- const params = this.saveParams()
- console.log(params)
- if (this.editConfig.title === "鏂板缓") {
- // getAddContact(params)
- // .then((res) => {
- // console.log(res)
- // this.editConfig.visible = false
- // if (res.code === 200) {
- // this.$message.success("娣诲姞鎴愬姛")
- // this.$parent.getData()
- // }
- // })
- } else {
- // getUpdateContact(params)
- // .then((res) => {
- // console.log(res)
- // this.editConfig.visible = false
- // if (res.code === 200) {
- // this.$message.success("缂栬緫鎴愬姛")
- // this.$parent.getData()
- // }
- // })
- }
- } else {
- console.log("error submit")
- return false
- }
- })
- },
- saveParams() {
- let data = this.editConfig.infomation
- let params = {
- id: this.editConfig.title === "鏂板缓" ? 0 : data.id,
- birthday: data.birthday || "",
- city_id: data.city_id || 0,
- client_id: this.supplierId || 0,
- country_id: data.country_id || 0,
- desc: data.desc || "",
- email: data.email || "",
- is_first: data.is_first || false,
- member_id: data.member_id || 0,
- name: data.name || "",
- number: data.number || "",
- phone: data.phone || "",
- position: data.position || "",
- province_id: data.province_id || 0,
- region_id: data.region_id || 0,
- wechat: data.wechat || ""
- }
- return params
- },
- // 娣诲姞闄勪欢
- addAnnexClick() {},
- // 璁剧疆浜у搧绫诲埆
- setProductType() {
- this.editDropdownConfig.editVisible = true
- this.editDropdownConfig.title = "浜у搧绫诲埆"
- },
- // 璁剧疆鍗曚綅
- setUnit() {
- this.editDropdownConfig.editVisible = true
- this.editDropdownConfig.title = "鍗曚綅"
- },
- // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶
- querySearchAsync(queryString, cb) {
- var restaurants = this.clientList
- var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
- cb(results)
- },
- createStateFilter(queryString) {
- return (state) => {
- return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
- }
- },
- handleSelectClient(item) {
- this.supplierId = item.id
- },
- selClientClick() {
- this.editSelectClientConfig.editVisible = true
- },
- selClient(row) {
- console.log(row)
- this.editConfig.infomation.product_name = row.name
- this.supplierId = row.id
- },
- // 娓呴櫎宸查�夋嫨鐢ㄦ埛
- clearupClient() {
- this.editConfig.infomation.product_name = ""
- this.supplierId = 0
- },
- // 涓婁紶鍥剧墖
- toGetImg() {
- if (inputElement === null) {
- // 鐢熸垚鏂囦欢涓婁紶鐨勬帶浠�
- inputElement = document.createElement("input")
- inputElement.setAttribute("type", "file")
- inputElement.style.display = "none"
-
- if (window.addEventListener) {
- inputElement.addEventListener("change", this.uploadFile, false)
- } else {
- inputElement.attachEvent("onchange", this.uploadFile)
- }
-
- document.body.appendChild(inputElement)
- }
- inputElement.click()
- },
- uploadFile(el) {
- if (el && el.target && el.target.files && el.target.files.length > 0) {
- console.log(el)
- const files = el.target.files[0]
- const isLt2M = files.size / 1024 / 1024 < 2
- const size = files.size / 1024 / 1024
- console.log(size)
- // 鍒ゆ柇涓婁紶鏂囦欢鐨勫ぇ灏�
- if (!isLt2M) {
- this.$message.error("涓婁紶澶村儚鍥剧墖澶у皬涓嶈兘瓒呰繃 2MB!")
- } else if (files.type.indexOf("image") === -1) {
- //濡傛灉涓嶆槸鍥剧墖鏍煎紡
- // this.$dialog.toast({ mes: '璇烽�夋嫨鍥剧墖鏂囦欢' });
- this.$message.error("璇烽�夋嫨鍥剧墖鏂囦欢")
- } else {
- const that = this
- const reader = new FileReader() // 鍒涘缓璇诲彇鏂囦欢瀵硅薄
- reader.readAsDataURL(el.target.files[0]) // 鍙戣捣寮傛璇锋眰锛岃鍙栨枃浠�
- reader.onload = function () {
- // 鏂囦欢璇诲彇瀹屾垚鍚�
- // 璇诲彇瀹屾垚鍚庯紝灏嗙粨鏋滆祴鍊肩粰img鐨剆rc
- that.valueUrl = this.result
- console.log(this.result)
- }
- }
- }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-::v-deep {
- .iframe-dialog .el-dialog__body {
- .basic-info {
- .basic-info-title {
- background-color: #f4f8fe;
- padding-left: 10px;
- font-size: 15px;
- font-weight: bold;
- color: #666;
- height: 42px;
- line-height: 42px;
- }
- .basic-info-view {
- margin-top: 10px;
- padding-right: 40px;
- .custom-name,
- .common-select {
- display: flex;
- .common-select-btn {
- margin-left: 5px;
- font-size: 18px;
- cursor: pointer;
- }
- }
- .common-select {
- .common-select-sel {
- width: 270px;
- }
- }
- }
- .bigImg-div {
- width: 100px;
- height: 100px;
- line-height: 100px;
- text-align: center;
- overflow: hidden;
- border: 1px solid #ddd;
- .icon {
- font-size: 16px;
- }
- .bigImg {
- display: block;
- width: 100px;
- height: 100px;
- }
- }
- }
- .dialog-footer {
- background-color: #f5f5f5;
- height: 55px;
- line-height: 55px;
- }
- .el-input__inner {
- text-align: left;
- }
- }
-}
-</style>
diff --git a/src/views/productManage/product/DetailProduct.vue b/src/views/productManage/product/DetailProduct.vue
deleted file mode 100644
index 70d8732..0000000
--- a/src/views/productManage/product/DetailProduct.vue
+++ /dev/null
@@ -1,321 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose">
- <template slot="title">
- <div class="header">
- <span class="header-label">浜у搧璇︽儏</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- </template>
- <div class="content">
- <div class="tab-view">
- <el-tabs v-model="activeName" @tab-click="tabsClick">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
- <!-- <el-tab-pane label="閲囪喘璁㈠崟" name="second"> </el-tab-pane> -->
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <!-- <div class="business_scope">
- <div class="content-title">{{ "鍥剧墖锛�" }}</div>
- <div class="bigImg-div">
- <i class="el-icon-picture-outline icon" v-if="!valueUrl"></i>
- <img class="bigImg" :src="valueUrl" v-if="valueUrl" />
- </div>
- </div> -->
- <div class="business_scope">
- <div class="content-title">{{ "澶囨敞淇℃伅锛�" }}</div>
- <div class="content-data">{{ remark ? remark : "--" }}</div>
- </div>
- </div>
- </div>
- </div>
- <div v-if="activeName === 'second'" class="second"></div>
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-export default {
- name: "DetailProduct",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {}
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- addConfig: {},
- record: "", // 鏈�鏂拌繘灞�
- noContactDays: 0,
- newContactDays: "",
- valueUrl: "",
- remark: this.commonDetail.infomation.remark
- }
- },
- created() {
- this.setData(this.detailConfig.infomation)
- this.addConfig = {
- id_name: "sales_leads_id",
- id: this.detailConfig.infomation.id,
- common_name: this.detailConfig.infomation.id,
- sales_leads_name: this.detailConfig.infomation.name,
- sales_leads_id: this.detailConfig.infomation.id
- }
- },
- mounted() {},
- methods: {
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.record = item.FollowRecord[0].record
- console.log(item.FollowRecord[0].follow_time)
- let follow_time = item.FollowRecord[0].follow_time
- this.newContactDays = follow_time.substring(0, 10)
- this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays)
- }
- this.basicInfoList = [
- {
- leftStr: "浜у搧缂栫爜",
- leftValue: item.number,
- rightStr: "浜у搧鍚嶇О",
- rightValue: item.name
- },
- {
- leftStr: "浜у搧绫诲埆",
- leftValue: item.productType,
- rightStr: "渚涘簲鍟�",
- rightValue: item.supplier.name
- },
- {
- leftStr: "瑙勬牸",
- leftValue: item.specifications,
- rightStr: "鍨嬪彿",
- rightValue: item.modelNumber
- },
- {
- leftStr: "鍗曚綅",
- leftValue: item.unit,
- rightStr: "浠锋牸",
- rightValue: item.purchasePrice
- },
- {
- leftStr: "鏈�浣庡簱瀛�",
- leftValue: item.minimumStock,
- rightStr: "鏈�楂樺簱瀛�",
- rightValue: item.maximumStock
- }
- ]
- },
- handleClose() {
- this.detailConfig.visible = false
- },
- // tab鍒囨崲
- tabsClick(tab, event) {
- console.log(tab, event)
- },
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value)
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate
- let myDate_1 = date_1
- let myDate_2 = Date.parse(date_2)
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2) // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays // 鐩稿樊鐨勫ぉ鏁�
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.detail-view {
- z-index: 9999;
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .detail {
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- background: #fff;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 320px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 320px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- .bigImg-div {
- margin: 10px 25px;
- width: 100px;
- height: 100px;
- line-height: 100px;
- text-align: center;
- overflow: hidden;
- border: 1px solid #ddd;
- .icon {
- font-size: 26px;
- color: #ddd;
- }
- .bigImg {
- display: block;
- width: 100px;
- height: 100px;
- }
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-}
-::v-deep {
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
-</style>
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
deleted file mode 100644
index 4549c5c..0000000
--- a/src/views/productManage/product/index.vue
+++ /dev/null
@@ -1,251 +0,0 @@
-<template>
- <div class="product-manage">
- <div class="filter">
- <div class="filter-card">
- <CommonSearch
- :show-add="false"
- :show-download="true"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�/渚涘簲鍟�'"
- @searchClick="onFilterSearch"
- />
- </div>
- </div>
- <div class="body">
- <div class="body-card">
- <div class="list-view">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @selTableCol="selTableCol"
- >
- <!-- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="120">
- <template slot-scope="scope">
- <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
- <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </template> -->
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- </div>
- <!-- 鏂板缓/缂栬緫浜у搧 -->
- <AddProduct v-if="editConfig.visible" :add-common-config="editConfig" />
- <!-- 璇︽儏 -->
- <DetailProduct v-if="commonDetail.visible" :common-detail="commonDetail" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getProductList, deleteProduct } from "@/api/productManage/product"
-import DetailProduct from "@/views/productManage/product/DetailProduct"
-import AddProduct from "@/views/productManage/product/AddProduct"
-
-export default {
- name: "PruductManage",
- props: {},
- components: { DetailProduct, AddProduct },
- mixins: [pageMixin],
- computed: {},
- data() {
- return {
- searchText: "",
- tableList: {},
- searchOptions: [],
- commonDetail: {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- },
- editConfig: {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- },
- tableColumn: [
- { label: "浜у搧缂栫爜", prop: "number", min: 190, isCommonClick: true },
- { label: "浜у搧鍚嶇О", prop: "name", min: 130, default: true },
- { label: "渚涘簲鍟�", prop: "supplierName", min: 130 },
- { label: "浜у搧绫诲埆", prop: "productType", min: 130 },
- { label: "瑙勬牸", prop: "specifications", min: 130 },
- { label: "鍨嬪彿", prop: "modelNumber", min: 130 },
- { label: "鍗曚綅", prop: "unit", min: 60 },
- { label: "浠锋牸", prop: "purchasePrice", min: 130 },
- { label: "鏈�浣庡簱瀛�", prop: "minimumStock", min: 80 },
- { label: "鏈�楂樺簱瀛�", prop: "maximumStock", min: 80 }
- ],
- showCol: ["浜у搧缂栫爜", "浜у搧鍚嶇О", "渚涘簲鍟�", "浜у搧绫诲埆", "瑙勬牸", "浠锋牸", "鏈�浣庡簱瀛�", "鏈�楂樺簱瀛�"]
- }
- },
- created() {
- this.setTable()
- this.getData()
- },
- methods: {
- setColumnVisible(showCol) {
- return this.tableColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- showcol: this.showCol,
- allcol: [],
- tableColumn: this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
-
- this.searchOptions = []
- for (let i = 0; i < this.tableList.tableColumn.length; i++) {
- const label = this.tableList.tableColumn[i].label
- const value = this.tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
- }
- },
- selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
- },
- // 璇锋眰鏁版嵁
- async getData() {
- await getProductList({
- keyword: this.searchText,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- }).then((res) => {
- if (res.code === 200) {
- const list = res.data.list.map((item) => {
- return {
- ...item,
- supplierName: item.supplier.name,
- supplierNumber: item.supplier.number
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.total
- }
- })
- },
- // 鎼滅储
- // searchClick(val, content) {
- // console.log(val, content)
- // this.getData(val.value, content)
- // },
-
- onFilterSearch(val) {
- this.searchText = val ?? ""
- this.pagerOptions.currPage = 1
- this.getData()
- },
-
- // resetClick() {
- // this.getData()
- // },
- // 鏂板缓
- addBtnClick() {
- this.editConfig.visible = true
- this.editConfig.title = "鏂板缓"
- },
- // 缂栬緫
- handleClick(row) {
- console.log(row)
- this.editConfig.visible = true
- this.editConfig.title = "缂栬緫"
- this.editConfig.infomation = { ...row }
- },
- // 鍒犻櫎
- delClick(val) {
- this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- deleteProduct({ id: val }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("鍒犻櫎澶辫触")
- }
- })
- })
- .catch(() => {})
- },
- // 璇︽儏
- selCommonClick(row) {
- console.log(row)
- this.commonDetail.visible = true
- this.commonDetail.infomation = { ...row }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.product-manage {
- height: 100%;
- overflow: hidden;
- .filter {
- height: 80px;
- display: flex;
- align-items: center;
- padding: 12px 20px 0 20px;
- &-card {
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 10px 20px;
- flex: 1;
- border-radius: 12px;
- background-color: #fff;
- }
- }
- .body {
- box-sizing: border-box;
- padding: 10px 20px;
- border-radius: 12px;
- height: calc(100% - 92px);
- .body-card {
- background-color: #fff;
- border-radius: 12px;
- height: 100%;
- overflow: hidden;
- }
-
- .supplier-search {
- display: flex;
- align-items: center;
- .add-view {
- margin-left: auto;
- margin-right: 20px;
- }
- }
- .list-view {
- height: calc(100% - 60px);
- overflow: hidden;
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-</style>
diff --git a/src/views/purchaseManage/index.vue b/src/views/purchaseManage/index.vue
deleted file mode 100644
index 33670c0..0000000
--- a/src/views/purchaseManage/index.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<template>
- <div class="content">
- <router-view />
- </div>
-</template>
-
-<script>
-export default {
- name: "CustomM",
- props: {}
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.content {
- width: 100%;
- height: calc(100vh - 50px);
-}
-</style>
diff --git a/src/views/purchaseManage/purchase/DetailSupplier.vue b/src/views/purchaseManage/purchase/DetailSupplier.vue
deleted file mode 100644
index 75feb1e..0000000
--- a/src/views/purchaseManage/purchase/DetailSupplier.vue
+++ /dev/null
@@ -1,586 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer
- :visible.sync="detailConfig.visible"
- size="80%"
- :before-close="handleClose"
- :wrapperClosable="false"
- >
- <template slot="title">
- <div class="header">
- <span class="header-label">閲囪喘璇︽儏</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- <div class="btn" style="float: right; margin-right: 30px">
- <el-button type="primary" size="mini" disabled style="margin-right: 5px"
- >鎵撳嵃</el-button
- >
- <el-button type="primary" disabled size="mini" @click="emailClick"
- >Email閫氱煡涓嬪崟</el-button
- >
-
- <el-button
- type="primary"
- size="mini"
- @click="deleteClick"
- style="margin-right: 5px"
- >鍒犻櫎</el-button
- >
- </div>
- </template>
- <div class="content">
- <div class="info">
- <ul>
- <li v-for="(list, i) in formInfoList" :key="i">
- <span class="content-title">{{ list.str + "锛�" }}</span>
- <span class="content-data">{{
- list.value ? list.value : "--"
- }}</span>
- </li>
- </ul>
- </div>
- <div class="tab-view">
- <el-tabs v-model="activeName" @tab-click="tabsClick">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">
- {{ item.leftValue ? item.leftValue : "--" }}
- </div>
- </div>
- <div
- v-if="item.rightStr && item.rightStr.length > 0"
- class="right"
- >
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">
- {{ item.rightValue ? item.rightValue : "--" }}
- </div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "澶囨敞淇℃伅锛�" }}</div>
- <div class="content-data">{{ remark ? remark : "--" }}</div>
- </div>
- </div>
- </div>
- <!-- 璐㈠姟淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('dynamic')">
- <i v-if="isDynamicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">璐㈠姟淇℃伅</span>
- </div>
- <div v-show="isDynamicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in dynamicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">
- {{ item.leftValue ? item.leftValue : "--" }}
- </div>
- </div>
- <div
- v-if="item.rightStr && item.rightStr.length > 0"
- class="right"
- >
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">
- {{ item.rightValue ? item.rightValue : "--" }}
- </div>
- </div>
- </li>
- </ul>
- </div>
- </div>
- <!-- 浜у搧淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('three')">
- <i v-if="isExpandThree" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">浜у搧淇℃伅</span>
- </div>
- <div v-show="isExpandThree" class="basic-info-content">
- <TableCommonView
- style="margin-top: 2px"
- class="content-table"
- ref="tableListRef"
- :showSummary="showSummary"
- :table-list="tableList"
- @selTableCol="selTableCol"
- >
- </TableCommonView>
- <div class="table-bottom">
- <div class="table-bottom-item">
- <div class="table-bottom-l">
- 鏁村崟鎶樻墸锛歿{ detailConfig.infomation.wholeDiscountType==1?'鐧惧垎姣旈檷浠�':'鐩存帴闄嶄环' }}
- </div>
- <div class="table-bottom-r">{{detailConfig.infomation.wholeDiscount }}</div>
- </div>
- <div class="table-bottom-item">
- <div class="table-bottom-l">
- 璋冩暣锛歿{ detailConfig.infomation.priceAdjustmentType==1?'澧炲姞':'鍑忓皯' }}
- </div>
- <div class="table-bottom-r">{{ detailConfig.infomation.priceAdjustment }}</div>
- </div>
- <div class="table-bottom-item">
- <div class="table-bottom-l">
- 鍚堣
- </div>
- <div class="table-bottom-r">{{detailConfig.infomation.realTotalPrice }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-import { deletePurchase } from "@/api/purchaseManage/purchase";
-import { getDataByType } from "@/api/data";
-export default {
- name: "DetailSupplier",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {},
- tableList: [],
- };
- },
- },
- },
- components: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- formInfoList: [], //淇℃伅
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- isDynamicExpand: true, // 璐︽埛淇℃伅
- dynamicInfoList: [],
- remark: "", // 鏈�鏂拌繘灞�
- noContactDays: 0,
- newContactDays: "",
- isExpandThree: true, //浜у搧淇℃伅
- tableList: {},
- showSummary:{
- show: true,
- sumProp: ["amount", "total"],
- mergeNumber: 5,
- totalName:'灏忚'
- },
- showCol: ['浜у搧鍚嶇О', '浜у搧缂栫爜', '璁¢噺鍗曚綅', '瑙勬牸鍨嬪彿', '鏁伴噺', '閿�鍞崟浠�','浠风◣鍚堣','鎻忚堪'],
- purchaseStatusList:getDataByType('purchaseStatus'),
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "name", min: 160, },
- { label: "浜у搧缂栫爜", prop: "number", min: 130, },
- { label: "璁¢噺鍗曚綅", prop: "unit", min: 130 },
- { label: "瑙勬牸鍨嬪彿", prop: "specifications", min: 130 },
- { label: "鏁伴噺", prop: "amount", min: 130 },
- { label: "閿�鍞崟浠�", prop: "price", min: 130 },
- { label: "浠风◣鍚堣", prop: "total", min: 130 },
- { label: "鎻忚堪", prop: "remark", min: 130 },
- ],
- };
- },
- created() {
- this.setData(this.detailConfig.infomation);
-
- },
- mounted() {},
- computed: {},
- methods: {
- getpurchaseStatus(val) {
- if (val) {
- for (let i in this.purchaseStatusList) {
- if (this.purchaseStatusList[i].id == val) {
- return this.purchaseStatusList[i].name;
- }
- }
- } else {
- return "--";
- }
- },
- // email 閫氱煡涓嬪崟
- emailClick() {},
- // 鍒犻櫎
- deleteClick() {
- this.$confirm("鏄惁鍒犻櫎?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- deletePurchase({ id: this.commonDetail.infomation.ID }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛");
- this.detailConfig.visible=false;
- this.$parent.getData();
- } else {
- this.$message.warning("鍒犻櫎澶辫触");
- }
- });
- })
- .catch(() => {});
- },
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays);
- }
- this.remark =item.remark?item.remark:''
- this.formInfoList = [
- {
- str: "渚涘簲鍟嗗悕绉�",
- value: item.supplier.name,
- },
- {
- str: "鍚堣",
- value:item.realTotalPrice,
- },
- {
- str: "宸叉敹绁ㄩ噾棰�",
- value: item.invoiceAmount,
- },
- {
- str: "宸蹭粯閲戦",
- value: item.paidAmount,
- },
- {
- str: "绛剧害鏃ユ湡",
- value:item.signingDate,
- },
- {
- str: "閲囪喘璐熻矗浜�",
- value: item.principal,
- },
- {
- str: "鏈敹绁ㄩ噾棰�",
- value: item.unInvoiceAmount,
- },
- {
- str: "搴斾粯閲戦",
- value: item.shouldPayAmount,
- },
- ];
- this.basicInfoList = [
- {
- leftStr: "閲囪喘璁㈠崟缂栧彿",
- leftValue: item.number,
- rightStr: "渚涘簲鍟嗗悕绉�",
- rightValue: item.supplier.name,
- },
- {
- leftStr: "閲囪喘鍗曠姸鎬�",
- leftValue: this.getpurchaseStatus(item.status),
- rightStr: "閲囪喘璐熻矗浜�",
- rightValue: item.principal,
- },
- {
- leftStr: "閲囪喘鑱旂郴浜�",
- leftValue: item.contact,
- rightStr: "鑱旂郴鐢佃瘽",
- rightValue: item.phone,
- },
- {
- leftStr: "绛剧害鏃ユ湡",
- leftValue: item.signingDate,
- rightStr: "浜や粯鏃ユ湡",
- rightValue: item.deliveryDate,
- },
- {
- leftStr: "鍒拌揣浠撳簱",
- leftValue: item.warehouse,
- rightStr: "",
- rightValue: "",
- },
- ];
- this.dynamicInfoList = [
- {
- leftStr: "鍚堣",
- leftValue: item.realTotalPrice,
- rightStr: "宸叉敹绁ㄩ噾棰�",
- rightValue: item.invoiceAmount,
- },
- {
- leftStr: "宸蹭粯鎬婚",
- leftValue:item.paidAmount,
- rightStr: "鏈敹绁ㄩ噾棰�",
- rightValue: item.unInvoiceAmount,
- },
- {
- leftStr: "搴斾粯閲戦",
- leftValue: item.shouldPayAmount,
- rightStr: "",
- rightValue: "",
- },
- ];
- this.tableList = {
- tableInfomation: item.productList?item.productList:[],
- selectIndex: true,
- showcol: this.showCol,
- allcol:[],
- tableColumn:this.setColumnVisible(this.showCol)
- };
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
- },
- selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
- },
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
- return {
- ...ele,
- isShowColumn:showCol.includes(ele.label)
- }
- })
- },
- handleClose() {
- this.detailConfig.visible = false;
- },
- // tab鍒囨崲
- tabsClick(tab, event) {
- console.log(tab, event);
- },
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value);
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand;
- } else if (value === "dynamic") {
- this.isDynamicExpand = !this.isDynamicExpand;
- } else {
- this.isExpandThree = !this.isExpandThree;
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate;
- let myDate_1 = date_1;
- let myDate_2 = Date.parse(date_2);
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2); // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)); // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays; // 鐩稿樊鐨勫ぉ鏁�
- },
- },
-};
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.detail-view {
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- height: 100%;
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .info {
- width: 100%;
- height: auto;
- background: #fff;
- margin-bottom:10px;
- ul {
- width: 100%;
- height: auto;
- overflow: hidden;
- li {
- width: 25%;
- float: left;
- height: 40px;
- line-height: 40px;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .content-title {
- width: 180px;
- display: inline-block;
- text-align: right;
- color: #555;
- }
- .content-data {
- width: calc(100% - 180px - 25px);
- display: inline-block;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- }
- }
- .detail {
- height: calc(100% - 40px - 92px);
- background: #fff;
- overflow: auto;
-
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- background: #fff;
- overflow:hidden;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .table-bottom{
- width:300px;
- float:right;
- margin-right:180px;
- margin-top:10px;
- height:auto;
- line-height:30px;
- font-size:14px;
- font-weight: 700;
- color:#333;
- .table-bottom-item{
- width:100%;
- text-align:right;
- .table-bottom-l{
- width:180px;
- float:left;
- }
- .table-bottom-r{
- width:calc(100% - 180px);
- float:right;
- }
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-}
-::v-deep {
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
-</style>
diff --git a/src/views/purchaseManage/purchase/components/AddPurchase.vue b/src/views/purchaseManage/purchase/components/AddPurchase.vue
deleted file mode 100644
index b7936a4..0000000
--- a/src/views/purchaseManage/purchase/components/AddPurchase.vue
+++ /dev/null
@@ -1,1038 +0,0 @@
-<template>
- <div class="add-quotation">
- <el-dialog
- :title="editCommonConfig.title + '閲囪喘鍗�'"
- :visible.sync="editConfig.visible"
- width="50%"
- :before-close="handleClose"
- append-to-body
- custom-class="iframe-dialog"
- >
- <el-form
- ref="form"
- :model="editConfig.infomation"
- :rules="rules"
- label-position="right"
- label-width="130px"
- size="mini"
- style="height: 60vh; overflow-x: hidden"
- >
- <!-- 淇℃伅 -->
- <div class="basic-info">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info-title">鍩烘湰淇℃伅</div>
- <div class="basic-info-view">
- <el-row>
- <el-col :span="12">
- <el-form-item label="閲囪喘鍗曞彿" prop="number">
- <!-- <el-input v-model="editConfig.infomation.number"></el-input> -->
- <el-input
- style="width: 85%"
- v-if="
- editConfig.title == '缂栬緫' ||
- editConfig.title == '鏌ョ湅' ||
- (editConfig.title == '鏂板缓' && codenumer && (explain != '' || isIdDisabled))
- "
- :disabled="editConfig.title != '鏂板缓'"
- v-model="editConfig.infomation.number"
- placeholder="璇疯緭鍏ョ紪鐮�"
- >
- </el-input>
- <span v-else-if="editConfig.title == '鏂板缓'" style="color: #f56c6c; width: 85%"
- >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span
- >
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閲囪喘绫诲瀷" prop="purchaseTypeId" class="float_left" style="width: 100%">
- <el-select
- :disabled="editConfig.isDisabled"
- placeholder="璇烽�夋嫨閲囪喘绫诲瀷"
- v-model="editConfig.infomation.purchaseTypeId"
- clearable
- style="width: calc(100% - 30px)"
- >
- <el-option
- v-for="ele in plcBrandList"
- :key="ele.purchaseTypeId"
- :label="ele.name"
- :value="ele.id"
- ></el-option>
- </el-select>
- <i
- v-if="!editConfig.isDisabled"
- class="el-icon-setting margin_left_10px cursor_pointer"
- style="font-size: 20px; color: #333"
- @click="handleShow"
- ></i>
- </el-form-item>
- </el-col>
-
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName">
- <div class="custom-name">
- <el-autocomplete
- :disabled="editConfig.isDisabled"
- style="width: calc(100% - 40px)"
- v-model="editConfig.infomation.supplierName"
- :fetch-suggestions="
- (queryString, callback) => {
- querySearchAsync(queryString, callback, 'supplier')
- }
- "
- value-key="name"
- placeholder="璇烽�夋嫨"
- @select="handleSelectClient('client', $event)"
- ></el-autocomplete>
- <div v-if="!editConfig.isDisabled" class="common-select-btn" @click="selClientClick('client')">
- <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i>
- </div>
- <div
- v-if="editConfig.infomation.supplierName && editConfig.infomation.supplierName.length > 0"
- class="common-select-btn"
- @click="clearupClient('client')"
- >
- <i class="el-icon-remove-outline" v-if="!editConfig.isDisabled" title="娓呴櫎"></i>
- </div>
- </div>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="鍗曟嵁鏉ユ簮" prop="orderSource">
- <el-input v-model="editConfig.infomation.orderSource" disabled placeholder="璇峰~鍐�"></el-input>
- </el-form-item>
- </el-col> -->
- <el-col :span="12">
- <el-form-item label="閲囪喘鍗曞悕绉�" prop="name">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.name"
- placeholder="璇峰~鍐�"
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗚仈绯讳汉" prop="contact">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.contact"
- placeholder="璇峰~鍐�"
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.phone"
- placeholder="璇峰~鍐�"
- maxlength="11"
- show-word-limit
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="绛剧害鏃ユ湡" prop="signingDate">
- <el-date-picker
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.signingDate"
- style="width: 100%"
- type="date"
- clearable
- placeholder="閫夋嫨鏃ユ湡"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="浜や粯鏃ユ湡" prop="deliveryDate">
- <el-date-picker
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.deliveryDate"
- style="width: 100%"
- type="date"
- clearable
- placeholder="閫夋嫨鏃ユ湡"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏀惰揣浠撳簱" prop="warehouse">
- <el-select
- placeholder="璇烽�夋嫨鏀惰揣浠撳簱"
- v-model="editConfig.infomation.warehouse"
- clearable
- style="width: calc(100% - 0px)"
- :disabled="editConfig.isDisabled"
- >
- <el-option
- v-for="(ele, index) in receiveWhouseList"
- :key="index"
- :label="ele.name"
- :value="ele.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍦板潃" prop="warehouseAddress">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.warehouseAddress"
- placeholder="璇峰~鍐�"
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎺ユ敹浜�" prop="principal">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.principal"
- placeholder="璇峰~鍐�"
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏉ユ簮鍗曟嵁" prop="sourceOrder">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.sourceOrder"
- placeholder="璇峰~鍐�"
- clearable
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="澶囨敞淇℃伅" prop="remark">
- <el-input
- :disabled="editConfig.isDisabled"
- type="textarea"
- :autosize="{ minRows: 3, maxRows: 4 }"
- maxlength="500"
- clearable
- v-model="editConfig.infomation.remark"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <!-- 浜у搧绠$悊 -->
- <div class="basic-info-title" style="display: flex">浜у搧淇℃伅</div>
- <div class="product-view">
- <CommonFormTableView
- :detailEnter="editCommonConfig.detailEnter"
- :show-summary="showSummary"
- :recalculateShow="false"
- :addTypeIdMultiple="true"
- :product-table-list="productTableList"
- sign="purchase"
- @inputContent="inputContent"
- @getSummaries="getSummaries"
- @addProductClick="addProductClick"
- @getSelectArray="getSelectArray"
- @emptyProductClick="emptyProductClick"
- @clearupProduct="clearupProduct"
- @rowClick="rowClick"
- @handleProduct="handleProduct"
- />
- </div>
- <div class="table-bottom">
- <div class="table-bottom-item">
- <div class="table-bottom-l">
- <el-form-item label="鏁村崟鎶樻墸" prop="member_id">
- <el-select
- v-model="editConfig.infomation.wholeDiscountType"
- placeholder="璇烽�夋嫨"
- :disabled="editConfig.isDisabled"
- filterable
- @change="getTotal"
- >
- <el-option label="鐧惧垎姣旈檷浠�" :value="1"></el-option>
- <el-option label="鐩存帴闄嶄环" :value="2"></el-option>
- </el-select>
- </el-form-item>
- </div>
- <div class="table-bottom-r">
- <el-form-item label="" prop="member_id">
- <el-input
- v-model="editConfig.infomation.wholeDiscount"
- size="mini"
- :disabled="editConfig.isDisabled"
- @change="getTotal"
- placeholder="璇峰~鍐�"
- ></el-input>
- </el-form-item>
- </div>
- </div>
- <div class="table-bottom-item">
- <div class="table-bottom-l">
- <el-form-item label="璋冩暣" prop="member_id">
- <el-select
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.priceAdjustmentType"
- placeholder="璇烽�夋嫨"
- filterable
- @change="getTotal"
- >
- <el-option label="澧炲姞" :value="1"></el-option>
- <el-option label="鍑忓皯" :value="2"></el-option>
- </el-select>
- </el-form-item>
- </div>
- <div class="table-bottom-r">
- <el-form-item label="" prop="member_id">
- <el-input
- :disabled="editConfig.isDisabled"
- v-model="editConfig.infomation.priceAdjustment"
- size="mini"
- @change="getTotal"
- placeholder="璇峰~鍐�"
- ></el-input>
- </el-form-item>
- </div>
- </div>
- <div class="table-bottom-item">
- <div class="table-bottom-l">鍚堣</div>
- <div class="table-bottom-r">{{ total }}</div>
- </div>
- </div>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">淇濆苟鎻愪氦瀹℃壒</el-button> -->
- <el-button type="primary" v-if="this.editConfig.title != '鏌ョ湅'" size="small" @click="saveClick('form')"
- >淇濆瓨</el-button
- >
- <el-button size="small" v-if="this.editConfig.title != '鏌ョ湅'" @click="editConfig.visible = false"
- >鍙栨秷</el-button
- >
- </div>
- <!-- 閫夋嫨渚涘簲鍟嗗悕绉�-->
- <SelectSupplierDialog
- v-if="editSelectSupplierConfig.editVisible"
- :edit-common-config="editSelectSupplierConfig"
- @selClient="selClient"
- />
- </el-dialog>
- <BomDialog
- ref="editDialog"
- @sucessSet="handleGetBomKindDictList"
- @handleConfirmSave="handleConfirmSave"
- :editRow="editRow"
- :workList="plcBrandList"
- title="閲囪喘绫诲瀷"
- ></BomDialog>
- </div>
-</template>
-
-<script>
-import CommonFormTableView from "@/components/makepager/CommonFormTableView"
-import BomDialog from "@/components/makepager/BomDialog"
-import { getProductList } from "@/api/productManage/product"
-import {
- addPurchase,
- updatePurchase,
- savePurchaseType,
- getPurchaseType,
- getWarehouseInfo
-} from "@/api/purchaseManage/purchase"
-import SelectSupplierDialog from "@/views/purchaseManage/purchase/components/SelectSupplierDialog"
-// import { formToJSON } from "axios";
-import codeMixin from "@/components/mixin/codeMixin"
-
-export default {
- name: "QuotationDialog",
- components: { SelectSupplierDialog, CommonFormTableView, BomDialog },
- mixins: [codeMixin],
- props: {
- editCommonConfig: {
- type: Object,
- default: () => {
- return {
- detailEnter: true,
- visible: false,
- title: "鏂板缓",
- infomation: {}
- }
- }
- }
- },
- data() {
- return {
- editConfig: this.editCommonConfig,
- rules: {
- purchaseTypeId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- supplierName: [{ required: true, message: "璇烽�夋嫨渚涘簲鍟嗗悕绉�", trigger: "change" }],
- phone: [
- {
- required: false,
- message: "璇峰~鍐�",
- trigger: "change"
- },
- { validator: this.validatorPhone, trigger: "change" }
- ],
- wholeDiscount: [
- {
- required: false,
- message: "璇峰~鍐�0-100鐨勬暟瀛�",
- trigger: "change"
- },
- { validator: this.validatorNum, trigger: "change" }
- ],
- priceAdjustment: [
- {
- required: false,
- message: "璇峰~鍐�",
- trigger: "change"
- },
- { validator: this.validatorNumThree, trigger: "change" }
- ],
- number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }],
- warehouse: [{ required: true, message: "璇烽�夋嫨鏀惰揣浠撳簱", trigger: "change" }],
- signingDate: [{ required: true, message: "璇烽�夋嫨绛剧害鏃ユ湡", trigger: "change" }],
- deliveryDate: [{ required: true, message: "璇烽�夋嫨浜や粯鏃ユ湡", trigger: "change" }]
- },
- productTableList: {},
- showSummary: {
- show: true,
- total: false,
- sumProp: ["price", "total"],
- multiply: ["amount", "price"],
- titleProp: ["缂栧彿", "浜у搧鍚嶇О", "浜у搧缂栧彿", "璁¢噺鍗曚綅", "瑙勬牸", "鍨嬪彿", "閲囪喘鍗曚环", "鎻忚堪"],
- mergeNumber: 4,
- totalName: "灏忚"
- },
- editSelectSupplierConfig: {
- editVisible: false,
- title: "",
- infomation: {}
- },
- supplierId: this.editCommonConfig.infomation.supplierId,
- tableData: [],
- productIndex: 0,
- productId: "",
- isNoProduct: true,
- clientList: [],
- plcBrandList: [],
- editRow: {
- isDefault: "pin"
- },
- total: 0,
- totalTwo: 0,
- productListIdx: 0,
- lacks: [],
- receiveWhouseList: [] // 鏀惰揣浠撳簱鍒楄〃
- }
- },
- created() {
- console.log(this.editConfig, "鍙傛暟")
- this.handleGetBomKindDictList()
- this.getWarehouseInfo()
- this.$store.dispatch("getSupplier")
- this.formInfo()
- },
- computed: {
- supplierList() {
- return this.$store.state.getSupplierName.supplierList
- }
- },
- watch: {
- "editCommonConfig.visible": {
- immediate: true,
- handler: function () {
- this.handleGetBomKindDictList(true)
- }
- }
- },
- methods: {
- formInfo() {
- this.objCode.type = "閲囪喘鍗曠紪鐮�"
- this.objCode.codeStandID = ""
- if (this.editConfig.infomation.codeStandardID) {
- this.objCode.codeStandID = this.editConfig.infomation.codeStandardID
- }
- this.getRCodeStandardList()
- },
- validatorNum(rule, value, callback) {
- if (this.editConfig.infomation.wholeDiscountType == 1) {
- if (value == undefined || value == null || (!value && value != 0)) {
- callback(new Error("璇疯緭鍏ユ湁鏁堟暟瀛�"))
- } else {
- var reg = /^\+?[0-9]\d*$/
- if (!reg.test(value)) {
- callback(new Error("璇峰~鍐�0-100鐨勬暟瀛�"))
- } else {
- if (Number(value) > 100) {
- callback(new Error("璇峰~鍐�0-100鐨勬暟瀛�"))
- } else {
- callback()
- }
- }
- }
- } else {
- this.validatorNumThree(rule, value, callback)
- }
- },
- validatorNumThree(rule, value, callback) {
- if (value) {
- if (value == undefined || value == null) {
- callback(new Error("璇疯緭鍏ユ湁鏁堟暟瀛�"))
- } else {
- let reg2 = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
- if (!reg2.test(value)) {
- callback(new Error("璇峰~鍐�2浣嶅皬鏁扮殑鏁板瓧"))
- } else {
- callback()
- }
- }
- } else {
- callback()
- }
- },
- // PLC閰嶇疆璁剧疆
- handleShow() {
- this.handleGetBomKindDictList()
- this.$refs.editDialog.editDialogVisible = true
- },
- // PLC閰嶇疆
- handleGetBomKindDictList(val) {
- getPurchaseType().then((res) => {
- this.plcBrandList = res.data
- this.setTableForm()
- if (val) {
- for (let i in this.plcBrandList) {
- if (this.plcBrandList[i][this.editRow.isDefault]) {
- this.editConfig.infomation.purchaseTypeId = this.editConfig.infomation.purchaseTypeId
- ? this.editConfig.infomation.purchaseTypeId
- : this.plcBrandList[i].id
- this.$set(this.editConfig.infomation, "purchaseTypeId", this.editConfig.infomation.purchaseTypeId)
- break
- }
- }
- }
- })
- },
- handleConfirmSave(data) {
- console.log(data, "data")
- data.forEach((ele) => {
- delete ele.created_at
- })
-
- savePurchaseType(data).then(
- (res) => {
- if (res.code === 200) {
- this.$message({
- message: "鎿嶄綔鎴愬姛锛�",
- type: "success"
- })
- this.$refs.editDialog.editDialogVisible = false
- this.handleGetBomKindDictList(true)
- }
- },
- (err) => {
- console.error(err)
- this.$message({
- message: "鎿嶄綔澶辫触锛�",
- type: "warning"
- })
- }
- )
- },
- validatorPhone(rule, value, callback) {
- if (value) {
- if (value == undefined || value == null) {
- callback(new Error("璇疯緭鍏�"))
- } else {
- if (value.length != 11) {
- callback(new Error("闀垮害鍦�11涓瓧绗︼紒"))
- } else {
- var reg = /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
- if (!reg.test(value)) {
- callback(new Error("璇峰~鍐欐纭殑鑱旂郴鐢佃瘽锛�"))
- } else {
- callback()
- }
- }
- }
- } else {
- callback()
- }
- },
- // 淇濆瓨
- saveClick(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- for (let i = 0; i < this.tableData.length; i++) {
- if (this.tableData[i].name.length === 0) {
- this.isNoProduct = true
- break
- } else {
- this.isNoProduct = false
- }
- }
- if (this.isNoProduct) {
- this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖")
- } else {
- const params = this.saveParams()
- //鏂板缓
- if (this.editConfig.title === "鏂板缓") {
- this.lacks = []
- this.tableData.forEach((item) => {
- if (this.productTableList.tableProductList.map((obj) => obj.number).includes(item.number)) {
- console.log(`${item.name} 鍦ㄦ暟缁勪腑瀛樺湪`)
- } else {
- this.lacks.push(item.name)
- }
- })
- if (this.lacks.length > 0) {
- this.$confirm(`褰撳墠渚涘簲鍟嗕笉鑳芥彁渚涙偍閫夋嫨鐨勪骇鍝�:${this.lacks}, 鏄惁缁х画鍒涘缓閲囪喘鍗�?`, "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- console.log("纭畾鍒涘缓")
- //鍒涘缓閲囪喘鍗�
- addPurchase(params).then((res) => {
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("鍒涘缓鎴愬姛")
- this.$parent.getData()
- }
- })
- })
- .catch(() => {
- console.log("鍙栨秷鍒涘缓")
- })
- } else {
- addPurchase(params).then((res) => {
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("鍒涘缓鎴愬姛")
- this.$parent.getData()
- } else {
- this.$message.error(res.msg)
- }
- })
- }
- } else {
- // 缂栬緫
- getProductList({
- supplierId: this.editConfig.infomation.supplierId,
- page: 1,
- pageSize: 100
- }).then((res) => {
- if (res.code === 200) {
- this.lacks = []
- // 缂栬緫鍓嶅厛鐪嬬湅褰撳墠渚涘簲鍟嗗搴旂殑浜у搧鍒楄〃
- this.productTableList.tableProductList = res.data.list
- //褰撳墠浜у搧鏄惁鍦ㄥ綋鍓嶄緵搴斿晢涓嬪瓨鍦�
- this.tableData.forEach((item) => {
- if (this.productTableList.tableProductList.map((obj) => obj.number).includes(item.number)) {
- console.log(`${item.name} 鍦ㄦ暟缁勪腑瀛樺湪`)
- } else {
- this.lacks.push(item.name)
- }
- })
- // 涓嶅瓨鍦ㄧ殑浜у搧淇℃伅
- if (this.lacks.length > 0) {
- this.$confirm(`褰撳墠渚涘簲鍟嗕笉鑳芥彁渚涙偍閫夋嫨鐨勪骇鍝�:${this.lacks}, 鏄惁缁х画鏇存柊閲囪喘鍗�?`, "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- console.log("纭畾鏇存柊")
- //鏇存柊閲囪喘鍗�
- updatePurchase(params).then((res) => {
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("鏇存柊鎴愬姛")
- this.$parent.getData()
- }
- })
- })
- .catch(() => {
- console.log("鍙栨秷鏇存柊")
- })
- } else {
- updatePurchase(params).then((res) => {
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("鏇存柊鎴愬姛")
- this.$parent.getData()
- }
- })
- }
- }
- })
- }
- }
- } else {
- console.log("error submit")
- return false
- }
- })
- },
- saveParams() {
- let data = JSON.parse(JSON.stringify(this.editConfig.infomation))
-
- if (this.editConfig.infomation.wholeDiscountType == 2 && this.editConfig.infomation.wholeDiscount) {
- if (Number(this.editConfig.infomation.wholeDiscount) > Number(this.totalTwo)) {
- this.$message.error("鐩存帴闄嶄环涓嶈兘瓒呰繃浠风◣鍚堣鐨勬�诲拰锛�")
- return true
- }
- }
- let params = {
- productList: this.tableData,
- purchase: {
- number: data.number || "",
- supplierId: data.supplierId,
- signingDate: data.signingDate || "",
- remark: data.remark,
- orderSource: data.orderSource || "",
- purchaseTypeId: data.purchaseTypeId || 0,
- phone: data.phone || "",
- name: data.name || "",
- deliveryDate: data.deliveryDate || "",
- contact: data.contact,
- wholeDiscountType: data.wholeDiscountType ? data.wholeDiscountType : 0,
- wholeDiscount: data.wholeDiscount ? Number(data.wholeDiscount) : 0,
- priceAdjustmentType: data.priceAdjustmentType ? data.priceAdjustmentType : 0,
- priceAdjustment: data.priceAdjustment ? Number(data.priceAdjustment) : 0,
- realTotalPrice: this.total ? Number(this.total) : 0,
- totalPrice: this.totalTwo ? Number(this.totalTwo) : 0,
- status: data.status,
- quantity: data.quantity, // 閲囪喘鏁伴噺
- warehouse: data.warehouse || "", // 鏀惰揣浠撳簱
- warehouseAddress: data.warehouseAddress || "", // 鏀惰揣浠撳簱鍦板潃
- principal: data.principal || "", // 浠撳簱璐熻矗浜�
- sourceOrder: data.sourceOrder || "" // 鏉ユ簮鍗曟嵁
- }
- }
- if (data.id) {
- params.purchase.id = data.id
- }
- return params
- },
- handleClose() {
- this.editConfig.visible = false
- },
- // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶
- querySearchAsync(queryString, cb, value) {
- this.productTableList.tableProductList = []
- var restaurants = []
- if (value === "supplier") {
- restaurants = this.supplierList
- }
- var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants
- cb(results)
- },
- createStateFilter(queryString) {
- return (state) => {
- return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0
- }
- },
- // 閫夋嫨渚涘簲鍟�
- async handleSelectClient(value, item) {
- this.productTableList.supplierId = item.id
- if (value === "client") {
- this.supplierId = item.id
- this.editConfig.infomation.supplierId = item.id
- }
- await getProductList({
- supplierId: item.id,
- page: 1,
- pageSize: 100
- }).then((res) => {
- if (res.code === 200) {
- this.productTableList.tableProductList = res.data.list
- console.log(this.productTableList.tableProductList, "pop")
- }
- })
- },
- selClientClick() {
- this.editSelectSupplierConfig.editVisible = true
- },
- async selClient(row) {
- await getProductList({
- supplierId: row.id,
- page: 1,
- pageSize: 100
- }).then((res) => {
- if (res.code === 200) {
- this.productTableList.tableProductList = res.data.list
- }
- })
- this.$set(this.editConfig.infomation, "supplierName", row.name)
- this.editConfig.infomation.contact = row.contact
- this.editConfig.infomation.phone = row.phone
- this.editConfig.infomation.supplierId = row.id
- },
- // 娓呴櫎宸查�夋嫨鐢ㄦ埛
- clearupClient(value) {
- if (value == "client") {
- this.$set(this.editConfig.infomation, "supplierName", "")
- this.supplierId = null
- this.$forceUpdate()
- }
- },
- setTableForm() {
- if (!this.editConfig.infomation.id || this.editConfig.infomation.productList.length === 0) {
- this.tableData = [
- {
- purchaseId: 0,
- productId: Number(this.productId),
- productIndex: this.productIndex,
- amount: 1,
- name: "",
- number: "",
- price: 0,
- total: 0,
- remark: "",
- unit: "",
- purchasePrice: "",
- deliveryTime: "",
- shippingDuration: "",
- specifications: "",
- modelNumber: ""
- }
- ]
- } else {
- this.tableData = this.editConfig.infomation.productList
- // this.tableData.map((item, index) => {
- // item.productId = index + 1;
- // });
- }
- this.productTableList = {
- tableProductList: [],
- supplierId: undefined,
- tableData: this.tableData,
- disabled: this.editConfig.isDisabled,
- isReturn: true,
- tableColumn: [
- {
- label: "浜у搧鍚嶇О",
- prop: "name",
- min: 180,
- productName: true,
- isRequird: true,
- disabled: this.editConfig.isDisabled
- },
- { label: "浜у搧缂栧彿", prop: "number", min: 150 },
- { label: "璁¢噺鍗曚綅", prop: "unit" },
- { label: "瑙勬牸", prop: "specifications" },
- { label: "鍨嬪彿", prop: "modelNumber" },
- { label: "鏁伴噺", prop: "amount", inputNumber: true, disabled: this.editConfig.isDisabled },
- {
- label: "閲囪喘鍗曚环",
- prop: "purchasePrice",
- inputFloat: true,
- isRequird: true,
- disabled: this.editConfig.isDisabled
- },
- { label: "浠风◣鍚堣", prop: "total", inputFloat: true, disabled: this.editConfig.isDisabled, multiply: true },
- { label: "鎻忚堪", prop: "remark", input: true, disabled: this.editConfig.isDisabled }
- ]
- }
- this.toal = this.editConfig.infomation.realTotalPrice
- },
- // 浜у搧鍒楄〃杈撳叆
- inputContent(val, prop, row) {
- let num = 0
- this.tableData.map((item) => {
- num += item.amount
- if (item.number === row.number) {
- item[prop] = val
- }
- })
- if (prop === "amount") {
- this.editConfig.infomation.quantity = num
- }
- },
- getSummaries(total) {
- this.totalTwo = JSON.parse(JSON.stringify(total))
- this.total = total
- this.getTotal()
- },
- getTotal() {
- let prie = 0
- if (this.editConfig.infomation.priceAdjustmentType == 1) {
- prie = Number(this.editConfig.infomation.priceAdjustment)
- } else if (this.editConfig.infomation.priceAdjustmentType == 2) {
- prie = -1 * Number(this.editConfig.infomation.priceAdjustment)
- } else {
- prie = 0
- }
- let t = 0
- if (this.editConfig.infomation.wholeDiscountType == 1) {
- t = (this.totalTwo * Number(this.editConfig.infomation.wholeDiscount)) / 100
- } else if (this.editConfig.infomation.wholeDiscountType == 2) {
- t = Number(this.editConfig.infomation.wholeDiscount)
- } else {
- t = 0
- }
- this.total = this.totalTwo - t + Number(prie)
- },
- // 浜у搧鏂板
- addProductClick() {
- // this.productIndex++
- // this.tableData.push({
- // productIndex: this.productIndex,
- // productId: "",
- // id: 0,
- // amount: 0,
- // desc: "",
- // name: "",
- // number: "",
- // price: 0,
- // total: 0
- // })
- // this.showSummary.show = true
- },
- // 鏂板鏂瑰紡淇敼
- getSelectArray(val, index) {
- console.log(val, "ddd99999")
- if (this.tableData.length == 1 && this.tableData[0].number.length == 0) {
- this.tableData = []
- }
- if (index < this.tableData.length) {
- this.tableData.splice(index, 1)
- val.map((item, ind) => {
- this.tableData.splice(index + ind, 0, item)
- })
- } else {
- this.tableData = this.tableData.concat(val)
- }
- this.productTableList.tableData = this.tableData
- this.showSummary.show = true
- },
- // 浜у搧娓呯┖
- emptyProductClick() {
- this.productIndex = 1
- this.tableData = [
- {
- productId: "",
- productIndex: this.productIndex,
- id: 0,
- amount: "0",
- desc: "",
- name: "",
- number: "",
- price: 0,
- total: 0
- }
- ]
- this.productTableList.tableData = this.tableData
- },
- clearupProduct(data) {
- this.tableData = data
- this.productTableList.tableData = this.tableData
- },
- //閫夋嫨琛�
- rowClick(row) {
- console.log(row, "xuanze")
- this.productListIdx = row.productIndex
- },
- //閫変腑浜у搧
- handleProduct(item) {
- this.tableData[this.productListIdx].productId = Number(item.id)
- console.log(item, "閫変腑浜у搧", this.tableData)
- },
- // 鑾峰彇鏀惰揣浠撳簱鍒楄〃
- async getWarehouseInfo() {
- await getWarehouseInfo().then((res) => {
- console.log(res)
- this.receiveWhouseList = res.data.info
- })
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.table-bottom {
- width: 500px;
- float: right;
- margin-right: 20px;
- margin-top: 10px;
- height: auto;
- line-height: 30px;
- font-size: 14px;
- font-weight: 700;
- margin-bottom: 20px;
- color: #333;
- .table-bottom-item {
- width: 100%;
- text-align: right;
- .table-bottom-l {
- width: 250px;
- float: left;
- }
- .table-bottom-r {
- width: calc(100% - 250px);
- float: right;
- }
- }
-}
-::v-deep {
- .iframe-dialog .el-dialog__body {
- .basic-info {
- overflow: hidden;
- .basic-info-title {
- background-color: #f4f8fe;
- padding-left: 10px;
- font-size: 15px;
- font-weight: bold;
- color: #666;
- height: 42px;
- line-height: 42px;
- }
- .basic-info-view {
- margin-top: 10px;
- padding-right: 40px;
- .custom-name,
- .common-select {
- display: flex;
- .common-select-sel {
- width: 270px;
- }
- .common-select-btn {
- margin-left: 5px;
- font-size: 16px;
- cursor: pointer;
- }
- }
- }
- .annex-view {
- display: flex;
- color: #6166d3;
- .setFormat {
- margin-left: 10px;
- }
- }
- }
- .unflod-collapse {
- display: flex;
- height: 30px;
- justify-content: center;
- align-items: center;
- color: #6166d3;
- }
- .dialog-footer {
- background-color: #f5f5f5;
- height: 55px;
- line-height: 55px;
- }
- }
-}
-</style>
diff --git a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue b/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
deleted file mode 100644
index 0f57884..0000000
--- a/src/views/purchaseManage/purchase/components/SelectSupplierDialog.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-<template>
- <div class="edit-selClient-box">
- <el-dialog
- :title="'渚涘簲鍟嗗悕绉�'"
- :visible.sync="editConfig.editVisible"
- :width="dialogWidth"
- :before-close="handleClose"
- :append-to-body="true"
- :close-on-click-modal="false"
- >
- <div class="bg-view">
- <div class="query-bg">
- <SearchCommonView
- ref="searchCommonView"
- :search-options="searchOptions"
- @searchClick="searchClick"
- @resetClick="resetClick"
- />
- <div class="btn">
- <!-- <el-button type="primary" size="mini" disabled>璁剧疆瀛楁</el-button>
- <el-button type="primary" size="mini" disabled>蹇�熷垱寤�</el-button> -->
- </div>
- </div>
- <TableCommonView
- ref="tableListRef"
- v-loading="loading"
- :table-list="tableList"
- :select-box="false"
- @selCommonClick="selNameClick"
- @selTableCol="selTableCol"
- >
- </TableCommonView>
- <div slot="footer" class="dialog-footer">
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
-</template>
-
-<script>
-import { getSupplierList } from "@/api/supplierManage/supplier"
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-
-export default {
- name: "EditSelClientDialog",
- mixins: [pageMixin],
- props: {
- editCommonConfig: {
- type: Object,
- default: () => {
- return {
- editVisible: false,
- title: "",
- infomation: {}
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- dialogWidth: "40%",
- editConfig: this.editCommonConfig,
- queryInput: "",
- select: "1",
- tableData: [],
- searchSelOptions: [],
- loading: false,
- searchOptions: [],
- tableList: {},
- search_map: {},
- tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190 },
- { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130, isCommonClick: true },
- { label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 },
- { label: "鎵�灞炶涓�", prop: "industry", min: 130 },
- { label: "鑱旂郴浜�", prop: "contact", min: 130 },
- { label: "鑱旂郴鐢佃瘽", prop: "phone", min: 130 },
- { label: "鐘舵��", prop: "status_name", min: 130 },
- { label: "鍒涘缓鏃堕棿", prop: "member_name", min: 130 }
- ],
- showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "渚涘簲鍟嗙被鍨�", "鑱旂郴浜�", "鑱旂郴鐢佃瘽", "鐘舵��"]
- }
- },
- created() {
- this.setTable()
- this.getData()
- },
- mounted() {},
- methods: {
- setTable() {
- this.tableList = {
- tableInfomation: [],
- tableColumn: this.setColumnVisible(this.showCol),
- showcol: this.showCol,
- allcol: []
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
- this.searchOptions = []
- for (let i = 0; i < this.tableList.tableColumn.length; i++) {
- const label = this.tableList.tableColumn[i].label
- const value = this.tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
- }
- },
- selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
- },
- setColumnVisible(showCol) {
- return this.tableColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- handleClose() {
- this.editConfig.editVisible = false
- },
- // 璇锋眰鏁版嵁
- async getData(val, content) {
- this.loading = true
-
- await getSupplierList({
- [val]: content,
- status:1,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- if (res.code == 200) {
- if (res.data.list && res.data.list.length > 0) {
- const list = res.data.list.map((item) => {
- return {
- ...item,
- status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
- }
- })
- this.tableList.tableInfomation = list
- this.pagerOptions.totalCount = res.data.total
- } else {
- this.tableList.tableInfomation = []
- }
- } else {
- this.tableList.tableInfomation = []
- }
- this.loading = false
- })
- .catch((err) => {
- console.log(err)
- this.tableList.tableInfomation = []
- this.loading = false
- })
- },
- selNameClick(row) {
- this.editConfig.editVisible = false
- this.$emit("selClient", row)
- },
- // 鎼滅储
- searchClick(val, content) {
- this.getData(val.value, content)
- },
- resetClick() {
- this.getData()
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.bg-view {
- margin: 10px;
- .query-bg {
- margin-left: -20px;
- margin-bottom: 10px;
- display: flex;
- justify-content: space-between;
- .el-input {
- width: 310px;
- .el-select {
- width: 100px;
- }
- }
- .btn {
- float: right;
- }
- }
-}
-.sel-name {
- color: $color-primary;
- cursor: pointer;
-}
-.dialog-footer {
- height: 50px;
- line-height: 50px;
- color: red;
- .btn-pager {
- display: flex;
- margin-top: 0px;
- .page {
- margin-left: auto;
- }
- }
-}
-::v-deep {
- .input-with-select .el-input-group__prepend {
- background-color: #fff;
- }
-}
-</style>
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
deleted file mode 100644
index a553df6..0000000
--- a/src/views/purchaseManage/purchase/index.vue
+++ /dev/null
@@ -1,703 +0,0 @@
-<template>
- <div class="purchase" v-loading="tableLoading">
- <div class="filter">
- <div class="filter-card">
- <CommonSearch
- :show-add="true"
- add-title="鏂板缓"
- @addCommonClick="addBtnClick"
- :show-download="false"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О/鐗╂枡鍚嶇О/閲囪喘鍗曞悕绉�'"
- @searchClick="onFilterSearch"
- />
- </div>
- </div>
-
- <div class="body">
- <div class="content-top">
- <div class="list-view">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @selTableCol="selTableCol"
- @tableRowClick="tableRowClick"
- :selectClassRow="selectRow"
- >
- <template slot="tableButton">
- <el-table-column label="鐘舵��" width="120">
- <template slot-scope="scope">
- {{ getpurchaseStatus(scope.row.status) }}
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="220" fixed="right">
- <template slot-scope="scope">
- <el-button
- v-if="scope.row.status === 1"
- type="text"
- size="small"
- @click="btnConfirm(scope.row)"
- style="margin-right: 5px"
- >纭</el-button
- >
- <el-button
- v-if="scope.row.status === 1"
- type="text"
- size="small"
- @click="btnEdit(scope.row)"
- style="margin-right: 5px"
- >缂栬緫</el-button
- >
- <el-button type="text" size="small" @click="btnLook(scope.row)" style="margin-right: 5px"
- >鏌ョ湅</el-button
- >
- <el-button
- v-if="scope.row.status === 1"
- type="text"
- size="small"
- @click="btnCancel(scope.row)"
- style="margin-right: 5px"
- >鍙栨秷</el-button
- >
- <!-- <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px"
- >鍒犻櫎</el-button
- > -->
- <!-- <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">鎻愪氦</el-button> -->
- </template>
- </el-table-column>
- </template>
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- <div class="content-bottom">
- <div class="bottom-tabs">
- <div
- class="tab-pane"
- @click="getTab(0)"
- :style="{
- background: TabsIndex == 0 ? '#2a78fb' : '#F1F3F8',
- color: TabsIndex == 0 ? '#fff' : '#666'
- }"
- >
- 浜у搧淇℃伅
- </div>
- <div
- class="tab-pane"
- @click="getTab(1)"
- :style="{
- background: TabsIndex == 1 ? '#2a78fb' : '#F1F3F8',
- color: TabsIndex == 1 ? '#fff' : '#666'
- }"
- >
- 鏀惰揣淇℃伅
- </div>
- </div>
- <div class="list-view">
- <TableCommonView :loading="loading" :table-list="productTableList" @selTableCol="selBottomTableCol">
- <!-- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="160" fixed="right">
- <template slot-scope="scope">
- <el-button @click="viewClick(scope.row)" type="text" size="small">鏌ョ湅</el-button>
- </template>
- </el-table-column>
- </template> -->
- </TableCommonView>
- </div>
- </div>
- </div>
-
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
- <!-- 鏂板缓/缂栬緫 -->
- <AddPurchase ref="addDialog" v-if="editConfig.visible" :edit-common-config="editConfig" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import {
- getPurchaseList,
- getPurchaseInfo,
- submitPurchase,
- deletePurchase,
- getOperationInfo
-} from "@/api/purchaseManage/purchase"
-import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
-import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
-import { getSupplierList } from "@/api/supplierManage/supplier"
-import { getDataByType } from "@/api/data"
-export default {
- name: "SupplierManage",
- props: {},
- components: { DetailSupplier, AddPurchase },
- mixins: [pageMixin],
- computed: {},
- data() {
- // 浜у搧淇℃伅
- const productColumn = [
- { label: "浜у搧缂栧彿", prop: "number", default: true },
- { label: "浜у搧鍚嶇О", prop: "name" },
- { label: "瑙勬牸", prop: "specifications" },
- { label: "鍨嬪彿", prop: "modelNumber" },
- { label: "閲囪喘鏁伴噺", prop: "amount" },
- { label: "宸插彂璐ф暟閲�", prop: "sendAmount" },
- { label: "宸插叆搴撴暟閲�", prop: "overAmount" },
- { label: "鍗曚綅", prop: "unit" },
- { label: "閲囪喘鍗曚环", prop: "purchasePrice", price: true },
- { label: "浠风◣鍚堣", prop: "total", price: true }
- ]
- // 鏀惰揣淇℃伅
- const recriveColumn = [
- { label: "鍏ュ簱鍗曞彿", prop: "operationNumber", default: true },
- { label: "鏀惰揣浠撳簱", prop: "warehouseName" },
- { label: "浜у搧鍚嶇О", prop: "name" },
- { label: "浜у搧缂栫爜", prop: "number" },
- { label: "鏁伴噺", prop: "amount" },
- { label: "鍏ュ簱鏃堕棿", prop: "overTime" },
- { label: "鏀惰揣浜�", prop: "principal" },
- { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus }
- ]
- return {
- purchaseStatusList: getDataByType("purchaseStatus"),
- receiveStatusList: getDataByType("receiveStatus"),
- tableLoading: false,
- tableList: {}, // 鍒楄〃
- selValueList: [],
- commonDetail: {
- visible: false,
- infomation: {}
- },
- search: "",
- editRow: {},
- editConfig: {
- visible: false,
- title: "鍒涘缓",
- isDisabled: false,
- detailEnter: false,
- infomation: {
- supplierList: []
- }
- },
- tableColumn: [
- { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 },
- { label: "閲囪喘鍗曞彿", prop: "number", min: 150, isCommonClick: true, default: true },
- { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
- { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 },
- { label: "鏀惰揣浠撳簱", prop: "warehouse", min: 130 },
- { label: "缁忓姙浜�", prop: "handledBy", min: 130 },
- { label: "鍒跺崟浜�", prop: "creator", min: 130 }
- ],
- showCol: ["閲囪喘鍗曞彿", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"],
- tableBottomColumn: [],
- showBottomCol: [],
- TabsIndex: "0",
- productTableList: {},
- // 浜у搧淇℃伅
- productColumn: productColumn,
- showProductCol: [
- "浜у搧缂栧彿",
- "浜у搧鍚嶇О",
- "瑙勬牸",
- "鍨嬪彿",
- "閲囪喘鏁伴噺",
- "宸插彂璐ф暟閲�",
- "宸插叆搴撴暟閲�",
- "鍗曚綅",
- "閲囪喘鍗曚环",
- "浠风◣鍚堣"
- ],
- // 鏀惰揣淇℃伅
- recriveColumn: recriveColumn,
- showReceiveCol: ["鍏ュ簱鍗曞彿", "鏀惰揣浠撳簱", "浜у搧鍚嶇О", "浜у搧缂栫爜", "鏁伴噺", "鍏ュ簱鏃堕棿", "鏀惰揣浜�", "鐘舵��"],
- loading: false,
- selectRow: {}
- }
- },
- created() {
- console.log(this.$route.params, "璺敱鍙傛暟")
- if (this.$route.params.supplierId) {
- this.editConfig.visible = true
- this.editConfig.infomation = {
- productList: [],
- purchaseTypeId: "",
- supplierId: this.$route.params.supplierId || "",
- supplierName: this.$route.params.supplierName || "",
- orderSource: "鎵嬪姩鍒涘缓",
- name: "",
- contact: "",
- phone: "",
- signingDate: "",
- deliveryDate: "",
- remark: "",
- wholeDiscountType: null,
- wholeDiscount: 0,
- priceAdjustmentType: null,
- priceAdjustment: 0,
- realTotalPrice: 0
- }
- }
- this.setTable()
- this.getData()
- this.getSupplierData()
- },
- methods: {
- getpurchaseStatus(val) {
- if (val) {
- for (let i in this.purchaseStatusList) {
- if (this.purchaseStatusList[i].id == val) {
- return this.purchaseStatusList[i].name
- }
- }
- } else {
- return "--"
- }
- },
- getreceiveStatusStatus(val) {
- if (val) {
- for (let i in this.receiveStatusList) {
- if (this.receiveStatusList[i].id == val) {
- return this.receiveStatusList[i].name
- }
- }
- } else {
- return "--"
- }
- },
- setColumnVisible(showCol, tableColumn) {
- return tableColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- showcol: this.showCol,
- allcol: [],
- tableColumn: this.setColumnVisible(this.showCol, this.tableColumn)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
- // bottom 浜у搧淇℃伅/鏀惰揣淇℃伅
- this.tableBottomColumn = this.productColumn
- this.showBottomCol = this.showProductCol
- this.setBottomList()
- },
- selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
- },
- // 璇锋眰鏁版嵁
- async getData() {
- await getPurchaseList({
- keyword: this.search || "",
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- if (res.code === 200) {
- let list = res.data.list
- list.map((item) => {
- item.supplierName = item.supplier.name
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.total
- if (res.data.total > 0) {
- this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {}
- this.tableRowClick(this.selectRow)
- }
- }
- })
- .catch((err) => {
- console.log(err)
- })
- },
- // 鑾峰彇渚涘簲鍟嗘暟鎹�
- async getSupplierData() {
- await getSupplierList({
- // [val]: content,
- status: 1,
- page: 1,
- pageSize: 10
- }).then((res) => {
- if (res.data.code == 200) {
- this.editConfig.infomation.supplierList = res.data.data.list
- }
- })
- },
- // 鎼滅储
- onFilterSearch(searchText) {
- this.search = searchText ?? ""
- this.pagerOptions.currPage = 1
- this.getData()
- },
- // 鏂板缓
- addBtnClick() {
- this.editConfig.detailEnter = false
- this.editConfig.isDisabled = false
- // this.editRow = {};
- // this.$refs.add.islook = true;
- this.editConfig.visible = true
- this.editConfig.title = "鏂板缓"
- this.editConfig.infomation = {
- productList: [],
- purchaseTypeId: "",
- supplierId: "",
- supplierName: "",
- orderSource: "鎵嬪姩鍒涘缓",
- name: "",
- number: "",
- contact: "",
- phone: "",
- signingDate: this.getCurrentDate(),
- deliveryDate: "",
- remark: "",
- wholeDiscountType: null,
- wholeDiscount: 0,
- priceAdjustmentType: null,
- priceAdjustment: 0,
- realTotalPrice: 0
- }
- },
- // 鑾峰彇褰撳墠鏃ユ湡
- getCurrentDate() {
- let now = new Date()
- let year = now.getFullYear()
- let month = now.getMonth() + 1
- let day = now.getDate()
- return year + "-" + month + "-" + day
- },
- // 缂栬緫
- btnEdit(row) {
- this.editConfig.detailEnter = false
- this.editConfig.isDisabled = false
- this.tableLoading = true
- getPurchaseInfo({ id: Number(row.id) }).then((res) => {
- if (res.code == 200) {
- this.tableLoading = false
- this.editConfig.visible = true
- this.editConfig.title = "缂栬緫"
- res.data.productList.map((item, index) => {
- item.productIndex = index
- })
- this.editConfig.infomation = {
- productList: res.data.productList,
- supplierName: res.data.purchase.supplier.name,
- ...res.data.purchase
- }
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- setTimeout(() => {
- this.tableLoading = false
- }, 3000)
- },
-
- // 纭鍙戣揣
- btnConfirm(row) {
- let string = "鏄惁鎻愪氦锛�"
- if (!row.supplierName) {
- string = "鎮ㄦ湁蹇呭~瀛楁鏈綍鍏ワ紝璇锋鏌ユ暟鎹畬鏁存�с��"
- }
- this.$confirm(string, "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(
- () => {
- if (!row.supplierName) {
- this.btnEdit(row)
- } else {
- submitPurchase({ id: Number(row.id), status: 2 }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鎻愪氦鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("鎻愪氦澶辫触")
- }
- })
- }
- },
- (e) => {
- console.error(e)
- }
- )
- },
- // 鍙栨秷
- btnCancel(row) {
- this.$confirm("鏄惁鍙栨秷?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(
- () => {
- submitPurchase({ id: Number(row.id), status: 5 }).then((response) => {
- if (response.code === 200) {
- this.$message.success("宸插彇娑�")
- this.getData()
- } else {
- // this.$message.warning("鎻愪氦澶辫触")
- }
- })
- },
- (e) => {
- console.error(e)
- }
- )
- },
- // 鍒犻櫎
- btnDelete(row) {
- this.$confirm("姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- deletePurchase({ id: Number(row.id) }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("鍒犻櫎澶辫触")
- }
- })
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "宸插彇娑堝垹闄�"
- })
- })
- },
- // 鏌ョ湅
- btnLook(row) {
- this.editConfig.detailEnter = true
- this.editConfig.isDisabled = true
- this.tableLoading = true
- getPurchaseInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- this.tableLoading = false
- this.editConfig.visible = true
- this.editConfig.title = "鏌ョ湅"
- this.editConfig.infomation = {
- productList: res.data.productList,
- supplierName: res.data.purchase.supplier.name,
- ...res.data.purchase
- }
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- setTimeout(() => {
- this.tableLoading = false
- }, 3000)
- },
- // 璇︽儏
- selCommonClick(row) {
- this.tableLoading = true
- getPurchaseInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- console.log(res, "浜у搧璇︽儏")
- this.tableLoading = false
- this.commonDetail.visible = true
- this.commonDetail.infomation = {
- productList: res.data.productList,
- ...res.data.purchase
- }
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- setTimeout(() => {
- this.tableLoading = false
- }, 3000)
- },
- // top 琛岀偣鍑�
- tableRowClick(row) {
- this.selectRow = row
- if (row.status == 1 && this.TabsIndex == 0) {
- getPurchaseInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- this.productTableList.tableInfomation = res.data.productList
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- } else if (this.TabsIndex == 1 && row.status == 1) {
- this.productTableList.tableInfomation = []
- } else {
- getOperationInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- this.productTableList.tableInfomation = res.data
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- }
- },
- // bom 鍒楄〃
- setBottomList() {
- this.productTableList = {
- selectIndex: true,
- tableInfomation: [],
- allcol: [],
- showcol: this.showBottomCol,
- tableColumn: this.setColumnVisible(this.showBottomCol, this.tableBottomColumn)
- }
- this.setTableList(this.productTableList)
- },
- setTableList(tableList) {
- tableList.allcol = tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
- this.searchOptions = []
- for (let i = 0; i < tableList.tableColumn.length; i++) {
- const label = tableList.tableColumn[i].label
- const value = tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
- }
- },
- // bottom 浜у搧淇℃伅
- selBottomTableCol(val) {
- this.showcol = val
- this.productTableList.tableColumn = this.setColumnVisible(val, this.tableBottomColumn)
- },
- //鑾峰彇褰撳墠閫変腑璧勬簮鐨刬d
- getTab(tab) {
- this.TabsIndex = tab
- if (this.TabsIndex == 0) {
- // 浜у搧淇℃伅鍒楄〃
- this.tableBottomColumn = this.productColumn
- this.showBottomCol = this.showProductCol
- this.setBottomList()
- this.getProductInventoryInfo(this.selectRow)
- } else if (this.TabsIndex == 1) {
- // 鏀惰揣淇℃伅鍒楄〃
- this.tableBottomColumn = this.recriveColumn
- this.showBottomCol = this.showReceiveCol
- this.setBottomList()
- this.getProductInventoryInfo(this.selectRow)
- }
- },
- // 鐘舵��
- getStatus(val) {
- return val === 1 ? "寰呯‘璁�" : val === 2 ? "寰呭嚭搴�" : val === 3 ? "鍑哄簱瀹屾垚" : val === 4 ? "宸插叧闂�" : "--"
- },
- // 鑾峰彇浜у搧/鏀惰揣淇℃伅
- async getProductInventoryInfo(row) {
- console.log(row)
- if (this.TabsIndex == 0 && row.status == 1) {
- getPurchaseInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- this.productTableList.tableInfomation = res.data.productList
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- } else if (this.TabsIndex == 1 && row.status == 1) {
- this.productTableList.tableInfomation = []
- } else {
- getOperationInfo({ id: row.id }).then((res) => {
- if (res.code == 200) {
- this.productTableList.tableInfomation = res.data
- } else {
- this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
- }
- })
- }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.purchase {
- height: 100%;
- overflow: hidden;
- background-color: transparent;
- .filter {
- height: 80px;
- display: flex;
- align-items: center;
- padding: 12px 20px 0 20px;
- &-card {
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 10px 20px;
- flex: 1;
- border-radius: 12px;
- background-color: #fff;
- }
- }
- .body {
- box-sizing: border-box;
- padding: 10px 20px;
- border-radius: 12px;
- height: calc(100% - 92px);
- .content-top {
- background-color: #fff;
- border-radius: 12px;
- min-height: 70px;
- height: 48%;
- position: relative;
- .list-view {
- height: calc(100% - 60px);
- }
- }
- .content-bottom {
- .bottom-tabs {
- height: 40px;
- line-height: 40px;
- background: #e6ecf2;
- display: flex;
- .tab-pane {
- width: 100px;
- margin-right: 20px;
- font-size: 14px !important;
- text-align: center;
- cursor: pointer;
- background: #2a78fb;
- border-top-left-radius: 20px;
- border-top-right-radius: 20px;
- }
- }
- .lable-view {
- background: #e6ecf2;
- height: 40px;
- line-height: 40px;
- .name {
- border-left: 4px solid #2a78fb;
- padding-left: 10px;
- }
- }
- background-color: #fff;
- border-radius: 12px;
- min-height: 70px;
- height: calc(52% - 60px);
- margin-top: 10px;
- // padding: 10px 20px;
- .list-view {
- height: calc(100% - 10px);
- }
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-</style>
diff --git a/src/views/purchaseManage/quality/DetailSupplier.vue b/src/views/purchaseManage/quality/DetailSupplier.vue
deleted file mode 100644
index 054e824..0000000
--- a/src/views/purchaseManage/quality/DetailSupplier.vue
+++ /dev/null
@@ -1,338 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :wrapperClosable="false">
- <template slot="title">
- <div class="header">
- <span class="header-label">璐ㄦ鍗曡鎯�</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- <div class="btn" style="float:right;margin-right:30px;">
- <el-button type="primary" size="mini" @click="qualityClick" icon="el-icon-search" style="margin-right: 5px"
- >鎵撳嵃</el-button
- >
- <el-button type="primary" size="mini" icon="el-icon-refresh-left" @click="qualityClick">鍘昏川妫�</el-button>
- </div>
- </template>
- <div class="content">
- <div class="tab-view">
- <el-tabs v-model="activeName">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
-
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "澶囨敞淇℃伅锛�" }}</div>
- <div class="content-data">{{ record ? record : "--" }}</div>
- </div>
- </div>
- </div>
- <!-- 璐︽埛淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('dynamic')">
- <i v-if="isDynamicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">浜у搧淇℃伅</span>
- </div>
- <div v-show="isDynamicExpand" class="basic-info-content">
- <TableCommonView
- style='margin-top:2px;'
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- >
- </TableCommonView>
- </div>
- </div>
- </div>
-
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-export default {
- name: "DetailSupplier",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {},
- tableList:[],
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- isDynamicExpand: true, // 浜у搧淇℃伅
- tableList: [],
- addConfig: {},
- record: "", // 鏈�鏂拌繘灞�
- }
- },
- created() {
- this.setData(this.detailConfig.infomation)
- this.addConfig = {
- id_name: "sales_leads_id",
- id: this.detailConfig.infomation.id,
- common_name: this.detailConfig.infomation.id,
- sales_leads_name: this.detailConfig.infomation.name,
- sales_leads_id: this.detailConfig.infomation.id
- }
- },
- mounted() {},
- methods: {
- // 鍘昏川妫�
- qualityClick(){
- this.$emit('qualityClick')
- },
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.record = item.FollowRecord[0].record
- console.log(item.FollowRecord[0].follow_time)
- }
- this.basicInfoList = [
- {
- leftStr: "閲囪喘璐ㄦ鍗曠紪鍙�",
- leftValue: item.number,
- rightStr: "璐ㄦ鐘舵��",
- rightValue: item.name
- },
- {
- leftStr: "閲囪喘鍗曠紪鍙�",
- leftValue: item.contact_name,
- rightStr: "璐ㄦ鍛�",
- rightValue: item.contact_position
- },
- {
- leftStr: "渚涘簲鍟嗗悕绉�",
- leftValue: item.contact_phone,
- rightStr: "鍒拌揣浠撳簱",
- rightValue: "18513375588"
- },
- {
- leftStr: "鐗╂祦鍏徃",
- leftValue: item.sales_resources,
- rightStr: "鍒涘缓鏃堕棿",
- rightValue: item.member_name
- },
- {
- leftStr: "鐗╂祦鍗曞彿",
- leftValue: item.sales_resources,
- rightStr: "",
- rightValue: ""
- }
- ]
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "number", min: 190, isCommonClick: true },
- { label: "浜у搧缂栫爜", prop: "name", min: 130, isCommonClick: true},
- { label: "璁¢噺鍗曚綅", prop: "contact_name", min: 130 },
- { label: "瑙勬牸鍨嬪彿", prop: "contact_phone", min: 130 },
- { label: "鍒拌揣鏁伴噺", prop: "contact_phone", min: 130 },
- { label: "鍚堟牸鏁伴噺", prop: "sales_resources", min: 130 },
- { label: "涓嶅悎鏍兼暟閲�", prop: "province", min: 130 },
- ]
- }
- },
- handleClose() {
- this.detailConfig.visible = false
- },
-
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value)
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand
- } else if (value === "dynamic") {
- this.isDynamicExpand = !this.isDynamicExpand
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate
- let myDate_1 = date_1
- let myDate_2 = Date.parse(date_2)
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2) // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays // 鐩稿樊鐨勫ぉ鏁�
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.detail-view {
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- height:100%;
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .detail {
- height:calc(100% - 40px);
- background:#fff;
- overflow:auto;
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- background: #fff;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-}
-::v-deep .el-drawer__body{
- height:calc(100% - 60px)!important;
- }
-::v-deep {
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
-
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
-</style>
diff --git a/src/views/purchaseManage/quality/index.vue b/src/views/purchaseManage/quality/index.vue
deleted file mode 100644
index 8b2521d..0000000
--- a/src/views/purchaseManage/quality/index.vue
+++ /dev/null
@@ -1,299 +0,0 @@
-<template>
- <div class="quality">
- <div class="filter">
- <div class="filter-card">
- <CommonSearch
- :show-add="false"
- :show-download="false"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ緵搴斿晢/鐗╂枡/閲囪喘鍗曠瓑'"
- @searchClick="onFilterSearch"
- />
- </div>
- </div>
-
- <div class="body">
- <div class="body-card">
- <div class="list-view">
- <TableCommonView
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @selTableCol="selTableCol"
- >
- <template slot="tableButton">
- <el-table-column align="center" label="鐘舵��" width="120">
- <template slot-scope="scope">
- {{ getQualityStatus(scope.row.member_name) }}
- </template>
- </el-table-column>
- <el-table-column align="center" label="鎿嶄綔" width="120" fixed="right">
- <template slot-scope="scope">
- <el-button @click="qualityClick(scope.row)" type="text" size="small">鍘昏川妫�</el-button>
- </template>
- </el-table-column>
- </template>
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- </div>
-
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" @qualityClick="qualityClick" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import {
- qualityInspectList,getPurchaseInfo,submitPurchase,
-} from "@/api/purchaseManage/purchase";
-import DetailSupplier from "@/views/purchaseManage/quality/DetailSupplier"
-import { getDataByType } from "@/api/data";
-export default {
- name: "SupplierManage",
- props: {},
- components: { DetailSupplier },
- mixins: [pageMixin],
- computed: {},
- data() {
- return {
- tableList: {}, // 鍒楄〃
- selValueList: [],
- commonDetail: {
- visible: false,
- infomation: {}
- },
- search: {},
- qualityStatusList:getDataByType('qualityStatus'),
- tableColumn: [
- { label: "璐ㄦ鍗曠紪鍙�", prop: "number", min: 190, isCommonClick: true,default:true },
- { label: "閲囪喘鍗曠紪鍙�", prop: "name", min: 130, isCommonClick: true },
- { label: "鍗曟嵁绫诲瀷", prop: "contact_name", min: 130 },
- { label: "渚涘簲鍟嗗悕绉�", prop: "contact_phone", min: 130 },
- { label: "鍒拌揣浠撳簱", prop: "sales_resources", min: 130 },
- { label: "璐ㄦ鏁伴噺", prop: "province", min: 130 },
- { label: "妫�楠屽憳", prop: "city", min: 130 },
- // { label: "鐘舵��", prop: "member_name", min: 110 },
- { label: "璐ㄦ鏃堕棿", prop: "member_name", min: 150 },
- ],
- showCol: ['璐ㄦ鍗曠紪鍙�', '閲囪喘鍗曠紪鍙�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '鍒拌揣浠撳簱', '璐ㄦ鏁伴噺', '妫�楠屽憳', '璐ㄦ鏃堕棿']
- }
- },
- created() {
- this.setTable()
- this.getData()
- },
- methods: {
- getQualityStatus(val) {
- if (val) {
- for (let i in this.qualityStatusList) {
- if (this.qualityStatusList[i].id == val) {
- return this.qualityStatusList[i].name;
- }
- }
- } else {
- return "--";
- }
- },
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
- return {
- ...ele,
- isShowColumn:showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- showcol: this.showCol,
- allcol: [],
- tableColumn:this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
- },
- selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
- },
- // 璇锋眰鏁版嵁
- async getData() {
-
- await qualityInspectList({
- keyword: this.search,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- const list = res.data.data.list
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.data.total
- })
- .catch((err) => {
- console.log(err)
- })
- },
- // 鎼滅储
- searchClick(val, content) {
- console.log(val, content)
- this.search = content
- this.getData()
- },
- resetClick() {
- this.search = ''
- this.getData()
- },
- onFilterSearch(searchText){
- this.search = searchText ?? ''
- this.pagerOptions.currPage = 1
- this.getData()
- },
-
- // 纭鍙戣揣
- qualityClick() {
- this.$confirm("鏄惁璐ㄦ?", "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- console.log("dddd")
- submitPurchase({ ids: this.selValueList }).then((response) => {
- if (response.code === 200) {
- this.$message.success("纭鍙戣揣鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("纭鍙戣揣澶辫触")
- }
- })
- })
- .catch(() => {})
- },
-
- // 璇︽儏
- selCommonClick(row) {
- console.log(row)
- getPurchaseInfo({id:row.ID}).then((res) => {
- if (res.code == 200) {
- this.commonDetail.visible = true
- this.commonDetail.infomation = {
- productList:res.data.productList,
- ...res.data.purchase
- }
- }else{
- this.$message.error(res.msg?res.msg+',':''+'鑾峰彇淇℃伅澶辫触锛�')
- }
- })
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-//.rightContent {
-// width:100%;
-// height:calc(100% - 10px);
-// .content-box {
-// height:100%;
-// .supplier-search {
-// display: flex;
-// align-items: center;
-// .add-view {
-// margin-left: auto;
-// margin-right: 20px;
-// }
-// }
-// .content-table{
-// // height:calc(100% - 60px - 42px);
-// }
-// .btn-pager {
-// display: flex;
-// .page {
-// margin-left: auto;
-// }
-// }
-// }
-// .bottom {
-// .product-search {
-// display: flex;
-// align-items: center;
-// .search {
-// margin-left: auto;
-// }
-// .add-view {
-// margin-left: 20px;
-// margin-right: 20px;
-// }
-// }
-// .btn-pager {
-// display: flex;
-// .page {
-// margin-left: auto;
-// }
-// }
-// }
-//}
-
-
-.quality{
- height: 100%;
- overflow: hidden;
- .filter{
- height: 80px;
- display: flex;
- align-items: center;
- padding: 12px 20px 0 20px;
- &-card{
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 10px 20px;
- flex: 1;
- border-radius: 12px;
- background-color: #fff;
- }
- }
- .body{
- box-sizing: border-box;
- padding: 10px 20px;
- border-radius: 12px;
- height: calc(100% - 92px);
- .body-card {
- background-color: #fff;
- border-radius: 12px;
- height: 100%;
- overflow: hidden;
- }
-
- .supplier-search {
- display: flex;
- align-items: center;
- .add-view {
- margin-left: auto;
- margin-right: 20px;
- }
- }
- .list-view {
- height: calc(100% - 60px);
- overflow: hidden;
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-</style>
diff --git a/src/views/purchaseManage/returned/DetailSupplier.vue b/src/views/purchaseManage/returned/DetailSupplier.vue
deleted file mode 100644
index 5db62d2..0000000
--- a/src/views/purchaseManage/returned/DetailSupplier.vue
+++ /dev/null
@@ -1,352 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :wrapperClosable="false">
- <template slot="title">
- <div class="header">
- <span class="header-label">閲囪喘閫�璐у崟</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- </template>
- <div class="content">
- <div class="tab-view">
- <el-tabs v-model="activeName">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
-
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "閫�璐у娉細" }}</div>
- <div class="content-data">{{ record ? record : "--" }}</div>
- </div>
- </div>
- </div>
- <!-- 璐︽埛淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('dynamic')">
- <i v-if="isDynamicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">浜у搧淇℃伅</span>
- </div>
- <div v-show="isDynamicExpand" class="basic-info-content">
- <TableCommonView
- style='margin-top:2px;'
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- :showSummary="showSummary"
- >
- </TableCommonView>
- </div>
- </div>
- </div>
-
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-export default {
- name: "DetailSupplier",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {},
- tableList:{},
- showSummary:{
- show: true,
- sumProp: ["number", "total"],
- mergeNumber: 4,
- totalName:'灏忚'
- },
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- isDynamicExpand: true, // 浜у搧淇℃伅
- tableList: [],
- addConfig: {},
- record: "", // 鏈�鏂拌繘灞�
- }
- },
- created() {
- this.setData(this.detailConfig.infomation)
- this.addConfig = {
- id_name: "sales_leads_id",
- id: this.detailConfig.infomation.id,
- common_name: this.detailConfig.infomation.id,
- sales_leads_name: this.detailConfig.infomation.name,
- sales_leads_id: this.detailConfig.infomation.id
- }
- },
- mounted() {},
- methods: {
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.record = item.FollowRecord[0].record
- console.log(item.FollowRecord[0].follow_time)
- }
- this.basicInfoList = [
- {
- leftStr: "閲囪喘閫�璐у崟缂栧彿",
- leftValue: item.number,
- rightStr: "渚涘簲鍟嗗悕绉�",
- rightValue: item.name
- },
- {
- leftStr: "璐ㄦ鍗曠紪鍙�",
- leftValue: item.contact_name,
- rightStr: "璐ㄦ鍛�",
- rightValue: item.contact_position
- },
- {
- leftStr: "閫�璐у崟鐘舵��",
- leftValue: item.contact_phone,
- rightStr: "閫�璐ф棩鏈�",
- rightValue: "18513375588"
- },
- {
- leftStr: "閫�璐т粨搴�",
- leftValue: item.sales_resources,
- rightStr: "缁忓姙浜�",
- rightValue: item.member_name
- },
- {
- leftStr: "鍒跺崟浜�",
- leftValue: item.sales_resources,
- rightStr: "璐ц繍鍏徃",
- rightValue: ""
- },
- {
- leftStr: "璐ㄦ鏃ユ湡",
- leftValue: item.sales_resources,
- rightStr: "鐗╂祦鍗曞彿",
- rightValue: ""
- },
- {
- leftStr: "閫�璐у師鍥�",
- leftValue: item.sales_resources,
- rightStr: "閫�璐у湴鍧�",
- rightValue: ""
- },
- {
- leftStr: "閫�璐ц仈绯讳汉",
- leftValue: item.sales_resources,
- rightStr: "",
- rightValue: ""
- }
- ]
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "number", min: 190, isCommonClick: true },
- { label: "浜у搧缂栫爜", prop: "name", min: 130, isCommonClick: true},
- { label: "璁¢噺鍗曚綅", prop: "contact_name", min: 130 },
- { label: "瑙勬牸鍨嬪彿", prop: "contact_phone", min: 130 },
- { label: "閲囪喘鏁伴噺", prop: "sales_resources", min: 130 },
- { label: "閫�璐ф暟閲�", prop: "province", min: 130 },
- ]
- }
- },
- handleClose() {
- this.detailConfig.visible = false
- },
-
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value)
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand
- } else if (value === "dynamic") {
- this.isDynamicExpand = !this.isDynamicExpand
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate
- let myDate_1 = date_1
- let myDate_2 = Date.parse(date_2)
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2) // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays // 鐩稿樊鐨勫ぉ鏁�
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.detail-view {
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- height:100%;
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .detail {
- height:calc(100% - 40px);
- background:#fff;
- overflow:auto;
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- background: #fff;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-}
-::v-deep .el-drawer__body{
- height:calc(100% - 60px)!important;
- }
-::v-deep {
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
-
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
-</style>
diff --git a/src/views/purchaseManage/returned/index.vue b/src/views/purchaseManage/returned/index.vue
deleted file mode 100644
index ce8dc79..0000000
--- a/src/views/purchaseManage/returned/index.vue
+++ /dev/null
@@ -1,238 +0,0 @@
-<template>
- <div class="returned">
- <div class="filter">
- <div class="filter-card">
- <CommonSearch
- :show-add="false"
- :show-download="false"
- :amount-view="false"
- :show-action-btn="false"
- placeholder="璇疯緭鍏ラ噰璐崟/渚涘簲鍟嗗悕绉扮瓑"
- @searchClick="onFilterSearch"
- />
- </div>
- </div>
-
- <div class="body">
- <div class="body-card">
- <div class="list-view">
- <TableCommonView
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @selTableCol="selTableCol"
- >
- <template slot="tableButton">
- <el-table-column align="center" label="鐘舵��" width="120">
- <template slot-scope="scope">
- {{ getReturnedStatus(scope.row.member_name) }}
- </template>
- </el-table-column>
- <el-table-column align="center" label="鎿嶄綔" width="120">
- <template slot-scope="scope">
- <el-button @click="confirmClick(scope.row)" type="text" size="small">纭鍙戣揣</el-button>
- </template>
- </el-table-column>
- </template>
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
-
- </div>
-
-
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import {
- getPurchaseList,getPurchaseInfo,submitPurchase,
-} from "@/api/purchaseManage/purchase";
-import DetailSupplier from "@/views/purchaseManage/returned/DetailSupplier"
-import { getDataByType } from "@/api/data";
-export default {
- name: "SupplierManage",
- props: {},
- components: { DetailSupplier },
- mixins: [pageMixin],
- computed: {},
- data() {
- return {
- tableList: {}, // 鍒楄〃
- selValueList: [],
- commonDetail: {
- visible: false,
- infomation: {}
- },
- search: '',
- returnedStatusList:getDataByType('returnedStatus'),
- tableColumn: [
- { label: "閫�璐у崟缂栧彿", prop: "number", min: 190, isCommonClick: true ,default:true},
- { label: "閲囪喘鍗曠紪鍙�", prop: "name", min: 130, isCommonClick: true},
- { label: "鍗曟嵁绫诲瀷", prop: "contact_name", min: 130 },
- { label: "渚涘簲鍟嗗悕绉�", prop: "contact_phone", min: 130 },
- { label: "閫�璐т粨搴�", prop: "sales_resources", min: 130 },
- { label: "閫�璐х悊鐢�", prop: "province", min: 180 },
- { label: "缁忓姙浜�", prop: "city", min: 130 },
- { label: "鍒跺崟浜�", prop: "member_name", min: 130 },
- { label: "閫�璐ф棩鏈�", prop: "member_name", min: 150 },
- // { label: "鐘舵��", prop: "member_name", min: 110 }
- ],
- showCol: ['閫�璐у崟缂栧彿', '閲囪喘鍗曠紪鍙�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '閫�璐т粨搴�', '閫�璐х悊鐢�', '閫�璐ф棩鏈�']
- }
- },
- created() {
- this.setTable()
- this.getData()
- },
- methods: {
- getReturnedStatus(val) {
- if (val) {
- for (let i in this.returnedStatusList) {
- if (this.returnedStatusList[i].id == val) {
- return this.returnedStatusList[i].name;
- }
- }
- } else {
- return "--";
- }
- },
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
- return {
- ...ele,
- isShowColumn:showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- showcol: this.showCol,
- allcol: [],
- tableColumn:this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
- },
- selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
- },
- // 璇锋眰鏁版嵁
- async getData() {
- await getPurchaseList({
- keyword: this.search,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- const list = res.data.data.list
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.data.total
- })
- .catch((err) => {
- console.log(err)
- })
- },
- onFilterSearch(searchText){
- this.search = searchText ?? ''
- this.pagerOptions.currPage = 1
- this.getData()
- },
-
- // 纭鍙戣揣
- confirmClick() {
- this.$confirm("鏄惁纭鍙戣揣?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- console.log("dddd")
- submitPurchase({ ids: this.selValueList }).then((response) => {
- if (response.code === 200) {
- this.$message.success("纭鍙戣揣鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("纭鍙戣揣澶辫触")
- }
- })
- })
- .catch(() => {})
- },
-
- // 璇︽儏
- selCommonClick(row) {
- console.log(row)
- getPurchaseInfo({id:row.ID}).then((res) => {
- if (res.code == 200) {
- this.commonDetail.visible = true
- this.commonDetail.infomation = {
- productList:res.data.productList,
- ...res.data.purchase
- }
- }else{
- this.$message.error(res.msg?res.msg+',':''+'鑾峰彇淇℃伅澶辫触锛�')
- }
- })
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.returned{
- height: 100%;
- overflow: hidden;
- background-color: transparent;
- .filter{
- height: 80px;
- display: flex;
- align-items: center;
- padding: 12px 20px 0 20px;
- &-card{
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 10px 20px;
- flex: 1;
- border-radius: 12px;
- background-color: #fff;
- }
- }
- .body{
- box-sizing: border-box;
- padding: 10px 20px;
- border-radius: 12px;
- height: calc(100% - 92px);
- &-card {
- background-color: #fff;
- border-radius: 12px;
- height: 100%;
- overflow: hidden;
- }
- .list-view {
- height: calc(100% - 60px);
- overflow: hidden;
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-</style>
diff --git a/src/views/purchaseManage/warehouse/DetailSupplier.vue b/src/views/purchaseManage/warehouse/DetailSupplier.vue
deleted file mode 100644
index 343aa87..0000000
--- a/src/views/purchaseManage/warehouse/DetailSupplier.vue
+++ /dev/null
@@ -1,345 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :wrapperClosable="false">
- <template slot="title">
- <div class="header">
- <span class="header-label">鍏ュ簱鍗曡鎯�</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- </template>
- <div class="content">
- <div class="tab-view">
- <el-tabs v-model="activeName">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
-
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "澶囨敞淇℃伅锛�" }}</div>
- <div class="content-data">{{ record ? record : "--" }}</div>
- </div>
- </div>
- </div>
- <!-- 璐︽埛淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('dynamic')">
- <i v-if="isDynamicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">浜у搧淇℃伅</span>
- </div>
- <div v-show="isDynamicExpand" class="basic-info-content">
- <TableCommonView
- style='margin-top:2px;'
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- >
- </TableCommonView>
- </div>
- </div>
- </div>
-
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-export default {
- name: "DetailSupplier",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {},
- tableList:[],
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- isDynamicExpand: true, // 浜у搧淇℃伅
- tableList: [],
- addConfig: {},
- record: "", // 鏈�鏂拌繘灞�
- noContactDays: 0,
- newContactDays: ""
- }
- },
- created() {
- this.setData(this.detailConfig.infomation)
- this.addConfig = {
- id_name: "sales_leads_id",
- id: this.detailConfig.infomation.id,
- common_name: this.detailConfig.infomation.id,
- sales_leads_name: this.detailConfig.infomation.name,
- sales_leads_id: this.detailConfig.infomation.id
- }
- },
- mounted() {},
- methods: {
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.record = item.FollowRecord[0].record
- console.log(item.FollowRecord[0].follow_time)
- let follow_time = item.FollowRecord[0].follow_time
- this.newContactDays = follow_time.substring(0, 10)
- this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays)
- }
- this.basicInfoList = [
- {
- leftStr: "閲囪喘鍏ュ簱鍗曠紪鍙�",
- leftValue: item.number,
- rightStr: "鍏ュ簱鍗曠姸鎬�",
- rightValue: item.name
- },
- {
- leftStr: "璐ㄦ鍗曠紪鍙�",
- leftValue: item.contact_name,
- rightStr: "渚涘簲鍟嗗悕绉�",
- rightValue: item.contact_position
- },
- {
- leftStr: "鍒拌揣浠撳簱",
- leftValue: item.contact_phone,
- rightStr: "閲囪喘璐熻矗浜�",
- rightValue: "18513375588"
- },
- {
- leftStr: "璐ㄦ鍛�",
- leftValue: item.sales_resources,
- rightStr: "浠撳簱鍛�",
- rightValue: item.member_name
- },
- {
- leftStr: "璐ㄦ鏃ユ湡",
- leftValue: item.sales_resources,
- rightStr: "鍏ュ簱瀹屾垚鏃堕棿",
- rightValue: ""
- },
- {
- leftStr: "鐗╂祦鍏徃",
- leftValue: item.sales_resources,
- rightStr: "鍒涘缓鏃堕棿",
- rightValue: ""
- },
- {
- leftStr: "鐗╂枡鍗曞彿",
- leftValue: item.sales_resources,
- rightStr: "",
- rightValue: ""
- }
- ]
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "number", min: 190, isCommonClick: true },
- { label: "浜у搧缂栫爜", prop: "name", min: 130, isCommonClick: true},
- { label: "璁¢噺鍗曚綅", prop: "contact_name", min: 130 },
- { label: "瑙勬牸鍨嬪彿", prop: "contact_phone", min: 130 },
- { label: "渚涘簲鍟嗗彂璐ф暟閲�", prop: "sales_resources", min: 160 },
- { label: "璐ㄦ鍚堟牸鏁伴噺", prop: "province", min: 180 },
- { label: "鍏ュ簱鏁伴噺", prop: "city", min: 130 },
- ]
- }
- },
- handleClose() {
- this.detailConfig.visible = false
- },
-
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value)
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand
- } else if (value === "dynamic") {
- this.isDynamicExpand = !this.isDynamicExpand
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate
- let myDate_1 = date_1
- let myDate_2 = Date.parse(date_2)
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2) // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays // 鐩稿樊鐨勫ぉ鏁�
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.detail-view {
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- height:100%;
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .detail {
- height:calc(100% - 40px);
- background:#fff;
- overflow:auto;
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- background: #fff;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 180px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-}
-::v-deep .el-drawer__body{
- height:calc(100% - 60px)!important;
- }
-::v-deep {
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
-
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
-</style>
diff --git a/src/views/purchaseManage/warehouse/index.vue b/src/views/purchaseManage/warehouse/index.vue
deleted file mode 100644
index 016f319..0000000
--- a/src/views/purchaseManage/warehouse/index.vue
+++ /dev/null
@@ -1,210 +0,0 @@
-<template>
- <div class="rightContent">
- <div class="content-box">
- <div class="supplier-search">
- <SearchCommonView
- ref="searchCommonView"
- :inputSelect="false"
- placeholder="鍙緭鍏ュ叆搴撳崟鍙�,渚涘簲鍟嗗悕绉扮瓑鎼滅储"
- @searchClick="searchClick"
- @resetClick="resetClick"
- />
-
- </div>
- <template>
- <TableCommonView
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @getSelectArray="getSelectArray"
- >
- <!-- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="120">
- <template slot-scope="scope">
-
- </template>
- </el-table-column>
- </template> -->
- </TableCommonView>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </template>
- </div>
-
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <!-- <AddSalesLeadDialog v-if="editSalesLeadConfig.visible" :edit-rightContent-config="editSalesLeadConfig" /> -->
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getSalesLeadsList, getDeleteSalesLeads } from "@/api/client/salesLead"
-import DetailSupplier from "@/views/purchaseManage/warehouse/DetailSupplier"
-
-export default {
- name: "SupplierManage",
- props: {},
- components: { DetailSupplier },
- mixins: [pageMixin],
- computed: {},
- data() {
- return {
- tableList: {}, // 鍒楄〃
- selValueList: [],
- commonDetail: {
- visible: false,
- infomation: {}
- },
- search_map: {}
- }
- },
- created() {
- this.setTable()
- this.getData()
- },
- methods: {
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- tableColumn: [
- { label: "鍏ュ簱鍗曞彿", prop: "number", min: 190, isCommonClick: true },
- { label: "閲囪喘缂栧彿", prop: "name", min: 130, isCommonClick: true},
- { label: "鍗曟嵁绫诲瀷", prop: "contact_name", min: 130 },
- { label: "渚涘簲鍟�", prop: "contact_phone", min: 130 },
- { label: "鏀惰揣浠撳簱", prop: "sales_resources", min: 130 },
- { label: "鍏ュ簱鏃堕棿", prop: "province", min: 180 },
- { label: "缁忓姙浜�", prop: "city", min: 130 },
- { label: "鍒跺崟浜�", prop: "member_name", min: 130 },
- { label: "鐘舵��", prop: "member_name", min: 110 }
- ]
- }
- },
- // 璇锋眰鏁版嵁
- async getData() {
- await getSalesLeadsList({
- search_map: this.search_map,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- })
- .then((res) => {
- const list = res.data.list.map((item) => {
- return {
- ...item,
- province: item.Province.name,
- city: item.City.name,
- sales_resources: item.sales_sources.name,
- member_name: item.member.username
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.count
- })
- .catch((err) => {
- console.log(err)
- })
- },
- // 鎼滅储
- searchClick(val, content) {
- console.log(val, content)
- this.search_map = {
- [val.value]: content
- }
- this.getData()
- },
- resetClick() {
- this.search_map = {}
- this.getData()
- },
-
- // 鍒犻櫎
- delClick() {
- if (this.selValueList && this.selValueList.length > 0) {
- this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- console.log("dddd")
- getDeleteSalesLeads({ ids: this.selValueList }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛")
- this.getData()
- } else {
- this.$message.warning("鍒犻櫎澶辫触")
- }
- })
- })
- .catch(() => {})
- } else {
- this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉¤褰�")
- }
- },
- getSelectArray(val) {
- this.selValueList = []
- const list = val.map((item) => {
- return item.id
- })
- this.selValueList = list
- },
- // 璇︽儏
- selCommonClick(row) {
- console.log(row)
- this.commonDetail.visible = true
- this.commonDetail.infomation = { ...row }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.rightContent {
- width:100%;
- height:calc(100% - 10px);
- .content-box {
- height:100%;
- .supplier-search {
- display: flex;
- align-items: center;
- .add-view {
- margin-left: auto;
- margin-right: 20px;
- }
- }
- .content-table{
- // height:calc(100% - 60px - 42px);
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
- .bottom {
- .product-search {
- display: flex;
- align-items: center;
- .search {
- margin-left: auto;
- }
- .add-view {
- margin-left: 20px;
- margin-right: 20px;
- }
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-</style>
diff --git a/src/views/supplierManage/index.vue b/src/views/supplierManage/index.vue
deleted file mode 100644
index 2d40ad0..0000000
--- a/src/views/supplierManage/index.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<template>
- <div class="content">
- <router-view />
- </div>
-</template>
-
-<script>
-export default {
- name: "CustomM",
- props: {}
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.content {
- width: 100%;
- height: 100%;
-}
-</style>
diff --git a/src/views/supplierManage/supplier/AddNewProduct.vue b/src/views/supplierManage/supplier/AddNewProduct.vue
deleted file mode 100644
index 5c73f04..0000000
--- a/src/views/supplierManage/supplier/AddNewProduct.vue
+++ /dev/null
@@ -1,290 +0,0 @@
-<template>
- <div class="add-common">
- <el-dialog
- :title="addCommonConfig.title + '鎻愪緵鐨勪骇鍝�'"
- :visible.sync="editConfig.visible"
- :width="dialogWidth"
- :before-close="handleClose"
- :close-on-click-modal="false"
- append-to-body
- custom-class="iframe-dialog"
- >
- <div class="basic-info">
- <!-- 浜у搧淇℃伅 -->
- <div class="basic-info-title">浜у搧淇℃伅</div>
- <div class="basic-info-view">
- <CommonFormTableView
- ref="productTable"
- :addTypeIdMultiple="true"
- :product-table-list="productTableList"
- :detail-enter="detailEnter"
- :isOperate="isOperate"
- @inputContent="inputContent"
- @addProductClick="addProductClick"
- @getSelectArray="getSelectArray"
- @emptyProductClick="emptyProductClick"
- @clearupProduct="clearupProduct"
- @selCommonName="selCommonName"
- @handleProduct="handleProduct"
- />
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" size="small" @click="saveClick">淇� 瀛�</el-button>
- <el-button size="small" @click="editConfig.visible = false">鍙� 娑�</el-button>
- </div>
- </el-dialog>
- </div>
-</template>
-
-<script>
-import { createProduct, updateProduct } from "@/api/productManage/product"
-import CommonFormTableView from "@/components/makepager/CommonFormTableView"
-export default {
- name: "AddNewProduct",
- props: {
- addCommonConfig: {
- type: Object,
- default: () => {
- return {
- visible: false,
- title: "娣诲姞",
- infomation: {}
- }
- }
- }
- },
- components: { CommonFormTableView },
- computed: {},
- data() {
- return {
- dialogWidth: "60%",
- editConfig: this.addCommonConfig,
- productTableList: {},
- tableData: [],
- productId: 1,
- isNoProduct: true,
- supplierId: this.addCommonConfig.infomation.supplierId,
- detailEnter: true,
- isOperate: true,
- deliveryTime: this.addCommonConfig.infomation.deliveryTime, // 渚涜揣鏃堕暱
- shippingDuration: this.addCommonConfig.infomation.shippingDuration, // 鐗╂祦鏃堕暱
- purchasePrice: this.addCommonConfig.infomation.purchasePrice // 閲囪喘浠锋牸
- }
- },
- created() {
- // if (this.editConfig.title !== "娣诲姞" && this.editConfig.infomation.province_id !== 0) {
- // this.getCityList(this.editConfig.infomation.province_id, "edit")
- // }
- this.setTableForm()
- },
- methods: {
- handleClose() {
- this.editConfig.visible = false
- },
- // 淇濆瓨
- saveClick() {
- this.$refs.productTable.$refs.form.validate((valid) => {
- if (valid) {
- console.log(this.editConfig.infomation)
- for (let i = 0; i < this.tableData.length; i++) {
- if (this.tableData[i].name.length === 0) {
- this.isNoProduct = true
- break
- } else {
- this.isNoProduct = false
- }
- }
- if (this.isNoProduct) {
- this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖")
- } else {
- if (this.editConfig.title === "娣诲姞") {
- createProduct({
- list: this.tableData
- })
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("娣诲姞鎴愬姛")
- this.$parent.getProductList()
- }
- })
- .catch((e) => {
- console.log(e)
- })
- } else {
- const params = this.saveParams()
- updateProduct(params).then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("缂栬緫鎴愬姛")
- this.$parent.getProductList()
- }
- })
- }
- }
- }
- })
- },
- saveParams() {
- let data = this.editConfig.infomation
- let params = {
- deliveryTime: this.deliveryTime || 0,
- id: data.id || 0,
- maximumStock: data.maximumStock || 0,
- minimumStock: data.minimumStock || 0,
- modelNumber: data.modelNumber || "",
- name: data.name || "",
- number: data.number || "",
- productType: data.productType || "",
- purchasePrice: this.purchasePrice || 0,
- remark: data.remark || "",
- shippingDuration: this.shippingDuration || 0,
- specifications: data.specifications || "",
- supplierId: this.supplierId || 0,
- unit: data.unit || ""
- }
- return params
- },
- handleProduct(item, row) {
- this.editConfig.infomation.id = row.id
- },
- setTableForm() {
- if (this.editConfig.title === "娣诲姞") {
- this.detailEnter = false
- this.tableData = [
- {
- productId: this.productId,
- id: 0,
- amount: 0,
- desc: "",
- name: "",
- number: "",
- price: 0,
- total: 0,
- supplierId: this.supplierId
- }
- ]
- } else {
- this.tableData = [{ ...this.editConfig.infomation }]
- this.detailEnter = true
- }
- this.productTableList = {
- tableData: this.tableData,
- isReturn: true,
- tableColumn: [
- { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true, width: 250 },
- { label: "浜у搧缂栫爜", prop: "number" },
- { label: "璁¢噺鍗曚綅", prop: "unit" },
- { label: "瑙勬牸鍨嬪彿", prop: "specifications" },
- { label: "閲囪喘浠锋牸", prop: "purchasePrice", inputFloat: true, isRequird: true },
- { label: "渚涜揣鏃堕暱", prop: "deliveryTime", inputNumber: true, isRequird: true },
- { label: "鐗╂祦鏃堕暱", prop: "shippingDuration", inputNumber: true, isRequird: true }
- ]
- }
- },
- // 浜у搧鍒楄〃杈撳叆
- inputContent(val, prop, row) {
- this.tableData.map((item) => {
- if (item.number === row.number) {
- item[prop] = val
- item.supplierId = Number(this.supplierId)
- }
- })
- },
- // 浜у搧鏂板
- addProductClick() {
- // this.productId++
- // this.tableData.push({
- // productId: this.productId,
- // id: 0,
- // amount: 0,
- // desc: "",
- // name: "",
- // number: "",
- // purchasePrice: 0,
- // total: 0,
- // deliveryTime: 0,
- // shippingDuration: 0,
- // supplierId: this.supplierId
- // })
- },
- // 鏂板鏂瑰紡淇敼
- getSelectArray(val, index) {
- console.log(val, "ddd99999")
- if (this.tableData.length == 1 && this.tableData[0].number.length == 0) {
- this.tableData = []
- }
- if (index < this.tableData.length) {
- this.tableData.splice(index, 1)
- val.map((item, ind) => {
- this.tableData.splice(index + ind, 0, item)
- })
- } else {
- this.tableData = this.tableData.concat(val)
- }
- this.productTableList.tableData = this.tableData
- // this.showSummary.show = true
- },
- // 浜у搧娓呯┖
- emptyProductClick() {
- this.productId = 1
- this.tableData = [
- {
- productId: this.productId,
- id: 0,
- amount: 0,
- desc: "",
- name: "",
- number: "",
- purchasePrice: 0,
- total: 0,
- deliveryTime: 0,
- shippingDuration: 0,
- supplierId: this.supplierId
- }
- ]
- this.productTableList.tableData = this.tableData
- },
- // 浜у搧娓呴櫎
- clearupProduct(data) {
- this.tableData = data
- this.productTableList.tableData = this.tableData
- },
- selCommonName(row) {
- console.log("1133")
- console.log(row)
- this.editConfig.infomation = row
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-::v-deep {
- .iframe-dialog .el-dialog__body {
- .basic-info {
- .basic-info-title {
- background-color: #f4f8fe;
- padding-left: 10px;
- font-size: 15px;
- font-weight: bold;
- color: #666;
- height: 42px;
- line-height: 42px;
- }
- .basic-info-view {
- margin-top: 10px;
- }
- }
- .dialog-footer {
- background-color: #f5f5f5;
- height: 55px;
- line-height: 55px;
- }
- }
-}
-</style>
diff --git a/src/views/supplierManage/supplier/AddSupplier.vue b/src/views/supplierManage/supplier/AddSupplier.vue
deleted file mode 100644
index 8a7d35b..0000000
--- a/src/views/supplierManage/supplier/AddSupplier.vue
+++ /dev/null
@@ -1,563 +0,0 @@
-<template>
- <div class="add-common">
- <el-dialog
- :title="addCommonConfig.title + '渚涘簲鍟�'"
- :visible.sync="editConfig.visible"
- :width="dialogWidth"
- :before-close="handleClose"
- :close-on-click-modal="false"
- append-to-body
- custom-class="iframe-dialog"
- >
- <el-form
- ref="form"
- :model="editConfig.infomation"
- :rules="rules"
- label-position="right"
- label-width="150px"
- size="mini"
- >
- <!-- 淇℃伅 -->
- <div class="basic-info">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info-title">鍩烘湰淇℃伅</div>
- <div class="basic-info-view">
- <el-row>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗙紪鍙�" prop="number">
- <!-- <el-input v-model="editConfig.infomation.number"></el-input> -->
- <el-input
- style="width: 85%"
- v-if="
- editConfig.title == '淇敼' ||
- (editConfig.title == '鏂板缓' && codenumer && (explain != '' || isIdDisabled))
- "
- :disabled="editConfig.title != '鏂板缓'"
- v-model="editConfig.infomation.number"
- placeholder="璇疯緭鍏ョ紪鐮�"
- >
- </el-input>
- <span v-else-if="editConfig.title == '鏂板缓'" style="color: #f56c6c; width: 85%"
- >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span
- >
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗗悕绉�" prop="name">
- <el-input v-model="editConfig.infomation.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗙被鍨�" prop="supplierType">
- <div class="custom-name">
- <el-select
- v-model="editConfig.infomation.supplierType"
- placeholder="璇烽�夋嫨渚涘簲鍟嗙被鍨�"
- class="common-select-sel"
- size="mini"
- >
- <el-option
- v-for="(item, index) in supplierTypeOptions"
- :key="index"
- :label="item.name"
- :value="item.name"
- >
- </el-option>
- </el-select>
- <div class="common-select-btn" @click="setSupplierType"><i class="el-icon-setting"></i></div>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鎵�灞炶涓�" prop="industry">
- <div class="custom-name">
- <el-select
- v-model="editConfig.infomation.industry"
- placeholder="璇烽�夋嫨渚涘簲鍟嗚涓�"
- class="common-select-sel"
- size="mini"
- >
- <el-option
- v-for="(item, index) in industryOptions"
- :key="index"
- :label="item.name"
- :value="item.name"
- >
- </el-option>
- </el-select>
- <div class="common-select-btn" @click="setIndustry"><i class="el-icon-setting"></i></div>
- </div>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鑱旂郴浜�" prop="contact">
- <el-input v-model="editConfig.infomation.contact"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input
- v-model="editConfig.infomation.phone"
- maxlength="11"
- show-word-limit
- oninput="value=value.replace(/[^\d]/g,'')"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閿�鍞礋璐d汉" prop="responsiblePersonName">
- <!-- <el-input v-model="editConfig.infomation.responsiblePersonId"></el-input> -->
- <el-select
- v-model="editConfig.infomation.responsiblePersonName"
- placeholder="璇烽�夋嫨"
- size="mini"
- style="width: 63%"
- >
- <el-option
- v-for="(item, index) in memberOptions"
- :key="index"
- :label="item.username"
- :value="item.userName"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閭" prop="email">
- <el-input v-model="editConfig.infomation.email"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璇︾粏鍦板潃" prop="detailAddress">
- <el-input
- type="textarea"
- :autosize="{ minRows: 2 }"
- placeholder="璇疯緭鍏ュ唴瀹�"
- v-model="editConfig.infomation.detailAddress"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="缃戝潃" prop="url">
- <el-input v-model="editConfig.infomation.url"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <!-- 鍏ラ┗淇℃伅 -->
- <div class="basic-info-title">鍏ラ┗淇℃伅</div>
- <div class="basic-info-view">
- <el-row>
- <el-col :span="12">
- <el-form-item label="鎴峰悕" prop="accountName">
- <el-input v-model="editConfig.infomation.accountName"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="寮�鎴疯" prop="bank">
- <el-input v-model="editConfig.infomation.bank"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璐﹀彿" prop="account">
- <el-input v-model="editConfig.infomation.account"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="闄勪欢" prop="">
- <template slot="label">
- <div style="display: flex; float: right">
- <div style="font-size: 16px">
- <i class="el-icon-warning-outline" title="鏈�澶氫笂浼�20涓檮浠讹紝鏈�澶ч檺鍒�5MB"></i>
- </div>
- <span style="margin-left: 5px">鍚堝悓闄勪欢</span>
- </div>
- </template>
- <div v-if="file_id === 0" class="annex-view">
- <div @click="addAnnexClick">
- <el-upload
- class="upload-demo"
- :headers="headers"
- action=""
- :limit="1"
- :before-upload="beforeAvatarUpload"
- :on-exceed="handleExceed"
- :file-list="fileList"
- :show-file-list="false"
- >
- <div style="display: flex; float: right">
- <div style="font-size: 16px"><i class="el-icon-paperclip"></i></div>
- <span>娣诲姞闄勪欢</span>
- </div>
- </el-upload>
- </div>
- </div>
- <!-- v-if="file_name && file_name.length > 0" -->
- <div v-else class="file-content">
- <div>{{ file_name }}</div>
- <div>
- <el-button type="text" @click="previewClick" style="margin-left: 10px">棰勮</el-button>
- <el-button type="text" @click="downloadClick">涓嬭浇</el-button>
- <el-button type="text" @click="delContractClick">鍒犻櫎</el-button>
- </div>
- <div ref="file"></div>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </div>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" size="small" @click="saveClick('form')">淇� 瀛�</el-button>
- <el-button size="small" @click="editConfig.visible = false">鍙� 娑�</el-button>
- </div>
- </el-dialog>
- <!-- 缂栬緫涓嬫媺妗� -->
- <EditDropdownDialog v-if="editDropdownConfig.editVisible" :edit-dropdown-config="editDropdownConfig" />
- </div>
-</template>
-
-<script>
-import {
- createSupplier,
- createContract,
- updateSupplier,
- getIndustryList,
- getSupplierTypeList
- // downloadContract
- // previewContract
-} from "@/api/supplierManage/supplier"
-import EditDropdownDialog from "@/views/other/commonDialog/EditDropdownDialog"
-import { getMemberListFromGrpc } from "@/api/common/other"
-import download from "downloadjs"
-// import { renderAsync } from "docx-preview"
-import axios from "axios"
-import codeMixin from "@/components/mixin/codeMixin"
-export default {
- name: "AddSupplierDialog",
- mixins: [codeMixin],
- props: {
- addCommonConfig: {
- type: Object,
- default: () => {
- return {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- }
- }
- }
- },
- components: { EditDropdownDialog },
- computed: {
- headers() {
- const authorization =
- "Bearer " + document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1") || ""
- return { authorization }
- }
- },
- data() {
- return {
- dialogWidth: "50%",
- editConfig: this.addCommonConfig,
- rules: {
- name: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- responsiblePersonName: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- phone: [
- { required: false, message: "", trigger: "blur" },
- { len: 11, message: "闀垮害鍦�11涓瓧绗�", trigger: "blur" },
- {
- pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
- message: "璇疯緭鍏ユ纭殑鎵嬫満鍙�",
- trigger: "blur"
- }
- ],
- email: [
- { required: false, message: "", trigger: "blur" },
- {
- pattern: /^[a-zA-Z0-9_\\.]+@[a-zA-Z0-9-]+[\\.a-zA-Z]+$/,
- message: "璇疯緭鍏ユ纭殑閭鏍煎紡",
- trigger: "blur"
- }
- ],
- number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }]
- },
- supplierTypeOptions: [{ id: 1, name: "渚涘簲鍟嗙被鍨�1" }], // 渚涘簲鍟嗙被鍨�
- industryOptions: [{ id: 1, name: "鎵�灞炶涓�1" }], // 鎵�灞炶涓�
- memberOptions: [{ id: 1, username: "admin" }],
- editDropdownConfig: {
- editVisible: false,
- title: "",
- infomation: {}
- },
- fileList: [],
- file_name: this.addCommonConfig.infomation.file_name,
- file_id: this.addCommonConfig.infomation.fileId,
- previewUrl: "",
- loading: false
- }
- },
- created() {
- this.getSupplierTypeList()
- this.getIndustryList()
- this.getMemberList()
- if (this.editConfig.title === "淇敼") {
- // this.previewContract()
- }
- this.formInfo()
- },
- methods: {
- formInfo() {
- this.objCode.type = "渚涘簲鍟嗙紪鐮�"
- this.objCode.codeStandID = ""
- if (this.editConfig.infomation.codeStandardID) {
- this.objCode.codeStandID = this.editConfig.infomation.codeStandardID
- }
- this.getRCodeStandardList()
- },
- // 閿�鍞礋璐d汉
- async getMemberList() {
- await getMemberListFromGrpc({
- page: 1,
- pageSize: 100
- }).then((res) => {
- console.log(res)
- this.memberOptions = res.data.list
- })
- },
- // 渚涘簲鍟嗙被鍨�
- async getSupplierTypeList() {
- await getSupplierTypeList({
- page: 1,
- pageSize: 100
- }).then((res) => {
- this.supplierTypeOptions = res.data.list
- })
- },
- // 鎵�灞炶涓�
- async getIndustryList() {
- await getIndustryList({
- page: 1,
- pageSize: 100
- }).then((res) => {
- this.industryOptions = res.data.list
- })
- },
- handleClose() {
- this.editConfig.visible = false
- },
- // 淇濆瓨
- saveClick(formName) {
- this.$refs[formName].validate((valid) => {
- if (valid) {
- console.log(this.editConfig.infomation)
- const params = this.saveParams()
- if (this.editConfig.title === "鏂板缓") {
- createSupplier(params)
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("娣诲姞鎴愬姛")
- this.$parent.getData()
- }
- })
- .catch((err) => {
- console.log(err)
- })
- } else {
- params.id=this.editConfig.infomation.id
- updateSupplier(params).then((res) => {
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message.success("缂栬緫鎴愬姛")
- this.$parent.getData()
- }
- })
- }
- } else {
- console.log("error submit")
- return false
- }
- })
- },
- saveParams() {
- let data = this.editConfig.infomation
- let params = {
- account: data.account || "",
- accountName: data.accountName || "",
- bank: data.bank || "",
- contact: data.contact || "",
- detailAddress: data.detailAddress || "",
- email: data.email || "",
- fileId: this.file_id || 0,
- // id: data.id || 0,
- industry: data.industry || "",
- name: data.name || "",
- number: data.number || "",
- phone: data.phone || "",
- responsiblePersonName:
- data.responsiblePersonName || document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1"),
- status: data.status || 0,
- supplierType: data.supplierType || "",
- url: data.url || ""
- }
- return params
- },
- // 娣诲姞闄勪欢
- addAnnexClick() {},
- // 璁剧疆渚涘簲鍟嗙被鍨�
- setSupplierType() {
- this.editDropdownConfig.editVisible = true
- this.editDropdownConfig.title = "渚涘簲鍟嗙被鍨�"
- },
- // 璁剧疆鎵�灞炶涓�
- setIndustry() {
- this.editDropdownConfig.editVisible = true
- this.editDropdownConfig.title = "鎵�灞炶涓�"
- },
- // 鏂囦欢涓婁紶--start
- beforeAvatarUpload(file) {
- // 鏂囦欢绫诲瀷鍒ゆ柇
- var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1)
- const extension = testmsg === "doc"
- const extension2 = testmsg === "pdf"
- const extension3 = testmsg === "docx"
- if (!extension && !extension2 && !extension3) {
- this.$message({
- message: "涓婁紶鏂囦欢鍙兘鏄� word銆乸df鏍煎紡!",
- type: "warning"
- })
- this.fileList = []
- } else {
- // 鍙傛暟鎷兼帴
- console.log(file)
- let fd = new FormData()
- fd.append("file", file)
- fd.append("name", file.name)
- // 璋冪敤鎺ュ彛
- createContract(fd).then((res) => {
- if (res.code == 200) {
- this.file_name = file.name
- this.file_id = res.data.id
- }
- })
- }
- },
- // 鏂囦欢瓒呭嚭涓暟闄愬埗鏃剁殑閽╁瓙
- handleExceed(files, fileList) {
- console.log(fileList)
- this.$message.warning(`褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠禶)
- },
- // 涓嬭浇鍚堝悓
- downloadClick() {
- let url = "/api/downloadContract?id=" + this.file_id
- download(url, "", "")
- },
- // 鍒犻櫎鍚堝悓
- delContractClick() {
- // deleteContract({
- // id: this.file_id
- // }).then((res) => {
- // console.log(res)
- // this.$message.success(res.msg)
- this.file_id = 0
- // })
- },
- // 棰勮鍚堝悓
- // async previewClick() {
- // this.previewUrl = "/api/con/previewContract?id=" + this.file_id
- // if (this.file_name.includes("pdf")) {
- // window.open(this.previewUrl, "_blank")
- // } else {
- // let routeUrl = this.$router.resolve({
- // path: "/PreviewFile",
- // query: {
- // //瑕佷紶鐨勫弬鏁�
- // previewUrl: this.previewUrl
- // }
- // })
- // window.open(routeUrl.href, "_blank")
- // }
- // }
- async previewClick() {
- this.previewUrl = "/api/previewContract?id=" + this.file_id
- if (this.file_name.includes("pdf")) {
- console.log("鏄痯df鏂囦欢")
- await axios
- .get(this.previewUrl, {
- headers: {
- Authorization: "Bearer " + document.cookie.replace(/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/, "$1")
- }
- })
- .then((response) => {
- window.open(this.previewUrl, "_blank")
- console.log("response", response, this.previewUrl)
- })
- .catch((error) => {
- console.error(error)
- })
- } else {
- console.log(this.previewUrl, "鐪嬬湅鏄暐瀛�")
- let routeUrl = this.$router.resolve({
- path: "/PreviewFile",
- query: {
- //瑕佷紶鐨勫弬鏁�
- previewUrl: this.previewUrl
- }
- })
- window.open(routeUrl.href, "_blank")
- }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-::v-deep {
- .iframe-dialog .el-dialog__body {
- .basic-info {
- .basic-info-title {
- background-color: #f4f8fe;
- padding-left: 10px;
- font-size: 15px;
- font-weight: bold;
- color: #666;
- height: 42px;
- line-height: 42px;
- }
- .basic-info-view {
- margin-top: 10px;
- padding-right: 40px;
- .custom-name,
- .common-select {
- display: flex;
- .common-select-btn {
- margin-left: 5px;
- font-size: 18px;
- cursor: pointer;
- }
- }
- .common-select {
- .common-select-sel {
- width: 270px;
- }
- }
- }
- .annex-view {
- display: flex;
- color: #6166d3;
- .setFormat {
- margin-left: 10px;
- }
- }
- .file-content {
- display: flex;
- }
- }
- }
-}
-</style>
diff --git a/src/views/supplierManage/supplier/DetailSupplier.vue b/src/views/supplierManage/supplier/DetailSupplier.vue
deleted file mode 100644
index 5c9aee8..0000000
--- a/src/views/supplierManage/supplier/DetailSupplier.vue
+++ /dev/null
@@ -1,453 +0,0 @@
-<template>
- <div class="detail-view">
- <el-drawer :visible.sync="detailConfig.visible" size="80%" :before-close="handleClose" :append-to-body="true">
- <template slot="title">
- <div class="header">
- <span class="header-label">渚涘簲鍟嗗悕绉�</span>
- <span class="header-title">{{ detailConfig.infomation.name }}</span>
- </div>
- </template>
- <div class="content">
- <div class="tab-view">
- <el-tabs v-model="activeName" @tab-click="tabsClick">
- <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
- <el-tab-pane label="閲囪喘璁㈠崟" name="second"> </el-tab-pane>
- </el-tabs>
- </div>
- <div v-if="activeName === 'first'" class="detail">
- <!-- 鍩烘湰淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('basic')">
- <i v-if="isBasicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">鍩烘湰淇℃伅</span>
- </div>
- <div v-show="isBasicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in basicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "璇︾粏鍦板潃" }}</div>
- <div class="content-data">
- {{ detailConfig.infomation.detailAddress ? detailConfig.infomation.detailAddress : "--" }}
- </div>
- </div>
- </div>
- </div>
- <!-- 璐︽埛淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-label" @click="expandClick('dynamic')">
- <i v-if="isDynamicExpand" class="el-icon-arrow-down"></i>
- <i v-else class="el-icon-arrow-up"></i>
- <span style="margin-left: 10px">璐︽埛淇℃伅</span>
- </div>
- <div v-show="isDynamicExpand" class="basic-info-content">
- <ul>
- <li v-for="(item, i) in dynamicInfoList" :key="i">
- <div class="left">
- <div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
- </div>
- <div v-if="item.rightStr && item.rightStr.length > 0" class="right">
- <div class="content-title">{{ item.rightStr + "锛�" }}</div>
- <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
- </div>
- </li>
- </ul>
- <div class="business_scope">
- <div class="content-title">{{ "鍚堝悓闄勪欢" }}</div>
- <div class="content-data downFlie" @click="downLoadFiles">
- {{ detailConfig.infomation.contract.fileName ? detailConfig.infomation.contract.fileName : "--" }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div v-if="activeName === 'second'" class="detail">
- <!-- 閲囪喘璁㈠崟-鍩烘湰淇℃伅 -->
- <!-- 浜у搧淇℃伅 -->
- <div class="basic-info">
- <div class="basic-info-content" >
- <el-button type="primary" size="mini" @click="toPurchaseBtn"><i class="el-icon-plus"></i> 鏂板缓</el-button>
- <TableCommonView
- style="margin-top: 2px"
- class="content-table"
- ref="tableListRef"
- :table-list="tableList"
- @selTableCol="selTableCol"
- >
- </TableCommonView>
- </div>
- </div>
- </div>
- </div>
- </el-drawer>
- </div>
-</template>
-
-<script>
-import download from "downloadjs"
-export default {
- name: "DetailSupplier",
- props: {
- commonDetail: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {},
- productListInfo:[]
- }
- }
- }
- },
- components: {},
- computed: {},
- data() {
- return {
- detailConfig: this.commonDetail,
- activeName: "first",
- isBasicExpand: true, // 鍩烘湰淇℃伅灞曞紑
- basicInfoList: [],
- isDynamicExpand: true, // 璐︽埛淇℃伅
- dynamicInfoList: [],
- addConfig: {},
- record: "", // 鏈�鏂拌繘灞�
- noContactDays: 0,
- newContactDays: "",
- tableList:{},
- showCol: ['閲囪喘鍗曞彿', '閲囪喘鍗曞悕绉�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '閲囪喘鏁伴噺', '鏀惰揣浠撳簱','缁忓姙浜�','鍒跺崟浜�'],
- tableColumn: [
- { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 },
- { label: "閲囪喘鍗曞彿", prop: "number", min: 150,default:true},
- { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130 },
- { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
- { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 },
- { label: "鏀惰揣浠撳簱", prop: "warehouse", min: 130 },
- { label: "缁忓姙浜�", prop: "handledBy", min: 130 },
- { label: "鍒跺崟浜�", prop: "creator", min: 130 }
- ],
- }
- },
- created() {
- console.log(this.commonDetail,"鎶藉眽缁勪欢props")
- this.setData(this.detailConfig.infomation)
- this.addConfig = {
- id_name: "sales_leads_id",
- id: this.detailConfig.infomation.id,
- common_name: this.detailConfig.infomation.id,
- sales_leads_name: this.detailConfig.infomation.name,
- sales_leads_id: this.detailConfig.infomation.id
- }
- },
- mounted() {},
- methods: {
- setData(item) {
- if (item.FollowRecord && item.FollowRecord.length > 0) {
- this.record = item.FollowRecord[0].record
- console.log(item.FollowRecord[0].follow_time)
- let follow_time = item.FollowRecord[0].follow_time
- this.newContactDays = follow_time.substring(0, 10)
- this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays)
- }
- this.basicInfoList = [
- {
- leftStr: "渚涘簲鍟嗙紪鍙�",
- leftValue: item.number,
- rightStr: "渚涘簲鍟嗗悕绉�",
- rightValue: item.name
- },
- {
- leftStr: "渚涘簲鍟嗙被鍨�",
- leftValue: item.supplierType,
- rightStr: "鎵�灞炶涓�",
- rightValue: item.industry
- },
- {
- leftStr: "鑱旂郴浜�",
- leftValue: item.contact,
- rightStr: "鑱旂郴鐢佃瘽",
- rightValue: item.phone
- },
- {
- leftStr: "閲囪喘璐熻矗浜�",
- leftValue: item.responsiblePersonName,
- rightStr: "缃戝潃",
- rightValue: item.url
- },
- {
- leftStr: "閭",
- leftValue: item.email,
- rightStr: "",
- rightValue: ""
- }
- ]
- this.purchaseList = [
- {
- leftStr: "閲囪喘鍗曞彿",
- leftValue: item.number,
- rightStr: "閲囪喘鍗曞悕绉�",
- rightValue: item.name
- },
- {
- leftStr: "渚涘簲鍟嗙被鍨�",
- leftValue: item.supplierType,
- rightStr: "鎵�灞炶涓�",
- rightValue: item.industry
- },
- {
- leftStr: "鍗曟嵁绫诲瀷",
- leftValue: item.contact,
- rightStr: "渚涘簲鍟嗗悕绉�",
- rightValue: item.phone
- },
- {
- leftStr: "閲囪喘鏁伴噺",
- leftValue: item.responsiblePersonName,
- rightStr: "鏀惰揣浠撳簱",
- rightValue: item.url
- },
- {
- leftStr: "缁忓姙浜�",
- leftValue: item.email,
- rightStr: "鍒跺崟浜�",
- rightValue: ""
- },
- {
- leftStr: "鐘舵��",
- leftValue: item.email,
- rightStr: "",
- rightValue: ""
- },
- ]
- this.dynamicInfoList = [
- {
- leftStr: "鎴峰悕",
- leftValue: item.accountName,
- rightStr: "寮�鎴疯",
- rightValue: item.bank
- },
- {
- leftStr: "璐﹀彿",
- leftValue: item.account,
- rightStr: "",
- rightValue: ""
- }
- ]
- this.detailConfig.productListInfo.map((item)=>{
- item.supplierName=item.supplier.name
- })
- this.tableList = {
- tableInfomation: this.detailConfig.productListInfo?this.detailConfig.productListInfo:[],
- selectIndex: true,
- showcol: this.showCol,
- allcol:[],
- tableColumn:this.setColumnVisible(this.showCol),
- };
- this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
- },
- selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setColumnVisible(val);
- },
- setColumnVisible(showCol){
- return this.tableColumn.map(ele=>{
- return {
- ...ele,
- isShowColumn:showCol.includes(ele.label)
- }
- })
- },
- handleClose() {
- this.detailConfig.visible = false
- },
- // tab鍒囨崲
- tabsClick(tab, event) {
- console.log(tab, event)
- },
- // 灞曞紑鏀惰捣鐐瑰嚮浜嬩欢
- expandClick(value) {
- console.log(value)
- if (value === "basic") {
- this.isBasicExpand = !this.isBasicExpand
- } else if (value === "dynamic") {
- this.isDynamicExpand = !this.isDynamicExpand
- }
- },
- // 璁$畻涓や釜鏃ユ湡涔嬮棿鐨勫樊鍊�
- getDiffDay(date_1, date_2) {
- let totalDays, diffDate
- let myDate_1 = date_1
- let myDate_2 = Date.parse(date_2)
- // 灏嗕袱涓棩鏈熼兘杞崲涓烘绉掓牸寮忥紝鐒跺悗鍋氬樊
- diffDate = Math.abs(myDate_1 - myDate_2) // 鍙栫浉宸绉掓暟鐨勭粷瀵瑰��
-
- totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 鍚戜笅鍙栨暣
- // console.log(totalDays)
-
- return totalDays // 鐩稿樊鐨勫ぉ鏁�
- },
- toPurchaseBtn(){
- this.$router.push({
- name: 'purchase',
- params: {
- supplierId:this.commonDetail.infomation.ID,
- supplierName:this.commonDetail.infomation.name
- }
- });
- },
- // 涓嬭浇鍚堝悓闄勪欢
- downLoadFiles(){
- if(this.detailConfig.infomation.contract.fileName){
- let url = "/api/downloadContract?id=" + this.commonDetail.infomation.fileId
- download(url, "", "")
- }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-::v-deep {
- .header {
- height: 56px;
- display: flex;
- align-items: center;
- padding-left: 10px;
- .header-label {
- padding: 5px;
- border-radius: 4px;
- background-color: #ff6600;
- color: #fff;
- font-size: 12px;
- }
- .header-title {
- color: #323232;
- font-size: 15px;
- margin-left: 10px;
- font-weight: inherit;
- }
- }
- .content {
- background-color: rgb(230, 233, 240);
- padding: 8px;
- .tab-view {
- background: #fff;
- // .tab-view-pane {
- // position: relative;
- .item {
- position: absolute;
- top: 0px;
- right: 0px;
- }
- // }
- }
- .detail {
- .basic-info {
- .basic-info-label {
- padding-left: 10px;
- height: 42px;
- line-height: 42px;
- background: #f4f8fe;
- color: #333;
- font-size: 14px;
- }
- .basic-info-content {
- margin-top: 10px;
- background: #fff;
- ul {
- padding-inline-start: 0;
- }
- li {
- display: flex;
- font-size: 14px;
- font-family: PingFangSC;
- border-bottom: 1px solid #f9f9fb;
- .left,
- .right {
- width: 50%;
- display: flex;
- align-items: center;
- height: 40px;
- .content-title {
- width: 320px;
- text-align: right;
- color: #555;
- }
- .content-data {
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- .remark {
- width: 100%;
- }
- }
- .business_scope {
- display: flex;
- align-items: center;
- font-size: 14px;
- min-height: 40px;
- .content-title {
- width: 320px;
- text-align: right;
- color: #555;
- }
- .content-data {
- flex: 1;
- padding: 5px;
- text-align: left;
- margin-left: 25px;
- color: #333;
- }
- }
- }
- }
- }
- .second {
- background: #fff;
- .followup-records {
- .table-view {
- margin-top: 0 !important;
- margin-bottom: 0;
- }
- }
- }
- }
-
- .el-drawer__header {
- padding: 0;
- margin-bottom: 0px;
- }
- .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
- padding-left: 20px;
- }
- .el-tabs__item.is-active {
- color: $color-primary;
- }
- .el-tabs__item:hover {
- color: $color-primary;
- }
- .el-tabs__active-bar {
- background-color: $color-primary;
- }
- .el-tabs__header {
- margin: 0;
- }
-}
- .downFlie{
- color: blue !important;
- cursor: pointer;
- }
-</style>
diff --git a/src/views/supplierManage/supplier/PreviewFile.vue b/src/views/supplierManage/supplier/PreviewFile.vue
deleted file mode 100644
index a0c198e..0000000
--- a/src/views/supplierManage/supplier/PreviewFile.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-<template>
- <div class="docx-container">
- <div ref="file"></div>
- </div>
-</template>
-
-<script>
-import axios from "axios"
-import { renderAsync } from "docx-preview"
-
-export default {
- props: {
- url: {
- type: String,
- default: ""
- }
- },
- data() {
- return {
- docxOptions: {
- className: "kaimo-docx-666", // string锛氶粯璁ゅ拰鏂囨。鏍峰紡绫荤殑绫诲悕/鍓嶇紑
- inWrapper: true, // boolean锛氬惎鐢ㄥ洿缁曟枃妗e唴瀹圭殑鍖呰鍣ㄦ覆鏌�
- ignoreWidth: false, // boolean锛氱鐢ㄩ〉闈㈢殑娓叉煋瀹藉害
- ignoreHeight: false, // boolean锛氱姝㈡覆鏌撻〉闈㈤珮搴�
- ignoreFonts: false, // boolean锛氱鐢ㄥ瓧浣撴覆鏌�
- breakPages: true, // boolean锛氬湪鍒嗛〉绗︿笂鍚敤鍒嗛〉
- ignoreLastRenderedPageBreak: false, // boolean锛氬湪 lastRenderedPageBreak 鍏冪礌涓婄鐢ㄥ垎椤�
- experimental: true, // boolean锛氬惎鐢ㄥ疄楠屽姛鑳斤紙鍒惰〃绗﹀仠姝㈣绠楋級
- trimXmlDeclaration: true, // boolean锛氬鏋滀负true锛岃В鏋愬墠浼氫粠xmlTemplate 鏂囨。涓Щ闄� xmlTemplate 澹版槑
- useBase64URL: false, // boolean锛氬鏋滀负true锛屽浘鐗囥�佸瓧浣撶瓑浼氳浆涓篵ase 64 URL锛屽惁鍒欎娇鐢║RL.createObjectURL
- useMathMLPolyfill: false, // boolean锛氬寘鎷敤浜� chrome銆乪dge 绛夌殑 MathML polyfill銆�
- showChanges: false, // boolean锛氬惎鐢ㄦ枃妗f洿鏀圭殑瀹為獙鎬ф覆鏌擄紙鎻掑叆/鍒犻櫎锛�
- debug: false // boolean锛氬惎鐢ㄩ澶栫殑鏃ュ織璁板綍
- }
- }
- },
- mounted() {
- this.renderFile()
- },
- methods: {
- renderFile() {
- console.log(this.url)
- var previewUrl = this.$route.query.previewUrl
- axios({
- method: "get",
- responseType: "blob",
- url: previewUrl
- }).then((response) => {
- renderAsync(response.data, this.$refs.file, null, this.docxOptions)
- })
- }
- }
-}
-</script>
-
-<style scoped>
-.docx-container ::v-deep .docx-wrapper {
- background-color: #fff;
- padding: 40px 40px;
-}
-</style>
diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
deleted file mode 100644
index 3dd1a88..0000000
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ /dev/null
@@ -1,162 +0,0 @@
-<template>
- <div class="add-common">
- <el-dialog
- :title="'鐩稿叧渚涘簲鍟�'"
- :visible.sync="editConfig.visible"
- :width="dialogWidth"
- :before-close="handleClose"
- :close-on-click-modal="false"
- append-to-body
- custom-class="iframe-dialog"
- >
- <div class="table-view">
- <TableCommonView ref="tableListRef" :table-list="tableList" @selCommonClick="selCommonClick"> </TableCommonView>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- <div slot="footer" class="dialog-footer"></div>
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
- </el-dialog>
- </div>
-</template>
-
-<script>
-import { getProductList,getSupplierByNumber} from "@/api/productManage/product"
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
-export default {
- name: "AddSupplierDialog",
- mixins: [pageMixin],
- props: {
- commonConfig: {
- type: Object,
- default: () => {
- return {
- visible: false,
- infomation: {}
- }
- }
- }
- },
- components: { DetailSupplier },
- computed: {},
- data() {
- return {
- dialogWidth: "60%",
- editConfig: this.commonConfig,
- tableList: {},
- commonDetail: {
- visible: false,
- infomation: {}
- },
- showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "閲囪喘浠锋牸", "渚涜揣澶╂暟", "鐗╂祦鏃堕暱(澶�)"],
- tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "supplierNumber", min: 190, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
- { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
- { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
- { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
- ],
- thatNumber:''
- }
- },
- created() {
- this.setTable()
- this.getProductList()
- },
- methods: {
- setColumnVisible(showCol) {
- return this.tableColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- highlight: true,
- ref: "tableListRef",
- showcol: this.showCol,
- allcol: [],
- tableColumn: this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
-
- this.searchOptions = []
- for (let i = 0; i < this.tableList.tableColumn.length; i++) {
- const label = this.tableList.tableColumn[i].label
- const value = this.tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
- }
- },
- selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
- },
- // 浜у搧鍒楄〃
- async getProductList(val, content) {
- console.log(val, content)
- await getProductList({
- number: this.editConfig.infomation.number,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- }).then((res) => {
- console.log(res.data)
- const list = res.data.list.map((item) => {
- return {
- ...item,
- supplierNumber: item.supplier.number,
- supplierName: item.supplier.name
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.total
- })
- },
- // 鍗曟潯渚涘簲鍟嗘暟鎹�-璇︽儏
- async getSupplierByNumber() {
- await getSupplierByNumber(
- this.thatNumber
- ).then((res) => {
- this.commonDetail.infomation = { ...res.data.res }
- })
- },
- handleClose() {
- this.editConfig.visible = false
- },
- async selCommonClick(row) {
- this.thatNumber=row.supplier.number
- await this.getSupplierByNumber()
- this.commonDetail.visible = true
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-::v-deep {
- .iframe-dialog .el-dialog__body {
- .table-view {
- margin: 10px;
- .btn-pager {
- display: flex;
- align-items: center;
- .page {
- margin-left: auto;
- }
- }
- }
- }
- .el-dialog__footer {
- background-color: #ffffff;
- height: 10px;
- border-top: 0px;
- }
-}
-</style>
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
deleted file mode 100644
index 5a2ed24..0000000
--- a/src/views/supplierManage/supplier/index.vue
+++ /dev/null
@@ -1,558 +0,0 @@
-<template>
- <div class="supplier">
- <div class="top">
- <div class="filter">
- <div class="filter-card">
- <CommonSearch
- :show-add="true"
- add-title="鏂板缓"
- @addCommonClick="addBtnClick"
- :show-download="true"
- :amount-view="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О'"
- @searchClick="onFilterSearch"
- />
- </div>
- </div>
- <div class="body">
- <div class="body-card">
- <div class="list-view">
- <TableCommonView
- ref="tableSupplier"
- :table-list="tableList"
- @selCommonClick="selCommonClick"
- @selTableCol="selTableCol"
- @tableRowClick="tableRowClick"
- :selectClassRow="selectRow"
- >
- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="100">
- <template slot-scope="scope">
- <el-button
- v-if="scope.row.status === 0"
- @click="enableClick(scope.row, '鍚敤')"
- type="text"
- size="small"
- >鍚敤</el-button
- >
- <el-button v-else @click="enableClick(scope.row, '鍋滅敤')" type="text" size="small">鍋滅敤</el-button>
- <el-button @click="modifyClick(scope.row)" type="text" size="small">淇敼</el-button>
- </template>
- </el-table-column>
- </template>
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
- </div>
- </div>
- </div>
- </div>
- <div class="bottom">
- <div class="simple-filter">
- <div class="simple-filter-card">
- <CommonSearch
- :show-add="false"
- :show-download="false"
- :amount-view="false"
- :show-screen="false"
- :show-action-btn="false"
- :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'"
- @searchClick="onProductFilterSearch"
- >
- <template slot="leftButton">
- <div class="sub-title"><span class="sub-title-decorator"></span>鍙彁渚涚殑浜у搧</div>
- <el-button type="primary" size="mini" @click="creatPurchase">鍒涘缓閲囪喘鍗�</el-button>
- </template>
- <template slot="rightButton">
- <el-button type="primary" size="mini" @click="addNewProductClick">娣诲姞鏂颁骇鍝�</el-button>
- </template>
- </CommonSearch>
- </div>
- </div>
- <div class="body">
- <div class="body-card">
- <div class="list-view">
- <TableCommonView
- ref="tableListProduct"
- :table-list="productTableList"
- @selCommonClick="selCommonClick"
- @getSelectArray="getSelectArray"
- @selTableCol="selProductTableCol"
- >
- <template slot="tableButton">
- <el-table-column label="鎿嶄綔" width="170">
- <template slot-scope="scope">
- <el-button @click="raleteClick(scope.row)" type="text" size="small">鐩稿叧渚涘簲鍟�</el-button>
- <el-button @click="editClick(scope.row)" type="text" size="small">淇敼</el-button>
- <el-button @click="delClick(scope.row)" type="text" size="small">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </template>
- </TableCommonView>
- </div>
- <div class="btn-pager">
- <PagerView
- class="page"
- :pager-options="productPagerOptions"
- @size-change="productChangeHandler"
- @current-change="currentProductHandler"
- />
- </div>
- </div>
- </div>
- </div>
- <!-- 鏂板缓/缂栬緫閿�鍞嚎绱� -->
- <AddSupplier v-if="editConfig.visible" :add-common-config="editConfig" />
- <!-- 璇︽儏 -->
- <DetailSupplier v-if="commonDetail.visible" :common-detail="commonDetail" />
- <!-- 鐩稿叧渚涘簲鍟� -->
- <RaleteSupplierList v-if="raleteSupplierConfig.visible" :common-config="raleteSupplierConfig" />
- <!-- 娣诲姞鏂颁骇鍝� -->
- <AddNewProduct v-if="newProductConfig.visible" :add-common-config="newProductConfig" />
- <!-- 鏂板缓/缂栬緫 -->
- <AddPurchase v-if="editPurchaseConfig.visible" :edit-common-config="editPurchaseConfig" />
- </div>
-</template>
-
-<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getSupplierList, changeSupplierStatus } from "@/api/supplierManage/supplier"
-import { getPurchaseList } from "@/api/purchaseManage/purchase"
-import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
-import AddSupplier from "@/views/supplierManage/supplier/AddSupplier"
-import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList"
-import AddNewProduct from "@/views/supplierManage/supplier/AddNewProduct"
-import { getProductList, deleteProduct } from "@/api/productManage/product"
-import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
-
-export default {
- name: "SupplierManage",
- props: {},
- components: { DetailSupplier, AddSupplier, RaleteSupplierList, AddNewProduct, AddPurchase },
- mixins: [pageMixin],
- computed: {},
- data() {
- return {
- searchSupplierName: "",
- tableList: {}, // 渚涘簲鍟嗗垪琛�
- productTableList: {}, // 浜у搧鍒楄〃
- selValueList: [],
- searchOptions: [],
- searchProductOptions: [], // 浜у搧鏌ヨ
- commonDetail: {
- visible: false,
- infomation: {},
- productListInfo: []
- },
- editConfig: {
- visible: false,
- title: "鏂板缓",
- infomation: {}
- },
- raleteSupplierConfig: {
- visible: false,
- infomation: {}
- },
- newProductConfig: {
- visible: false,
- title: "娣诲姞",
- infomation: {}
- },
- productPagerOptions: {
- currPage: 1,
- pageSize: 10,
- totalCount: 0
- },
- supplierId: 0,
- showCol: ["渚涘簲鍟嗙紪鍙�", "渚涘簲鍟嗗悕绉�", "渚涘簲鍟嗙被鍨�", "鎵�灞炶涓�", "鑱旂郴浜�", "鑱旂郴鐢佃瘽", "鐘舵��"],
- tableColumn: [
- { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true },
- { label: "渚涘簲鍟嗗悕绉�", prop: "name", min: 130, default: true },
- { label: "渚涘簲鍟嗙被鍨�", prop: "supplierType", min: 130 },
- { label: "鎵�灞炶涓�", prop: "industry", min: 130 },
- { label: "鑱旂郴浜�", prop: "contact", min: 130 },
- { label: "鑱旂郴鐢佃瘽", prop: "phone", min: 130 },
- { label: "鐘舵��", prop: "status_name", min: 130 },
- { label: "鍒涘缓鏃堕棿", prop: "created_at", min: 130 }
- ],
- showProductCol: ["浜у搧缂栫爜", "浜у搧鍚嶇О", "浜у搧瑙勬牸", "鍗曚綅", "閲囪喘浠锋牸", "渚涜揣鏃堕暱(澶�)", "鐗╂祦鏃堕暱(澶�)"],
- productColumn: [
- { label: "浜у搧缂栫爜", prop: "number", min: 190 },
- { label: "浜у搧鍚嶇О", prop: "name", min: 130, default: true },
- { label: "浜у搧瑙勬牸", prop: "specifications", min: 130 },
- { label: "鍗曚綅", prop: "unit", min: 130 },
- { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
- { label: "渚涜揣鏃堕暱(澶�)", prop: "deliveryTime", min: 130 },
- { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
- ],
- editPurchaseConfig: {
- // 鍒涘缓閲囪喘
- visible: false,
- title: "鍒涘缓",
- infomation: {
- supplierName: ""
- }
- },
- selectRow: {}
- }
- },
- created() {
- this.setTable()
- this.setProductTable()
- this.getData()
- },
- methods: {
- setColumnVisible(showCol) {
- return this.tableColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- setProductColumnVisible(showCol) {
- return this.productColumn.map((ele) => {
- return {
- ...ele,
- isShowColumn: showCol.includes(ele.label)
- }
- })
- },
- setTable() {
- this.tableList = {
- tableInfomation: [],
- selectIndex: true,
- highlight: true,
- ref: "tableListRef",
- showcol: this.showCol,
- allcol: [],
- tableColumn: this.setColumnVisible(this.showCol)
- }
- this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
-
- this.searchOptions = []
- for (let i = 0; i < this.tableList.tableColumn.length; i++) {
- const label = this.tableList.tableColumn[i].label
- const value = this.tableList.tableColumn[i].prop
- this.searchOptions.push({ value: value, label: label })
- }
- },
- selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setColumnVisible(val)
- },
- setProductTable() {
- this.productTableList = {
- tableInfomation: [],
- selectBox: true,
- selectIndex: true,
- showcol: this.showProductCol,
- allcol: [],
- tableColumn: this.setProductColumnVisible(this.showProductCol)
- }
- this.searchProductOptions = []
- for (let i = 0; i < this.productTableList.tableColumn.length; i++) {
- const label = this.productTableList.tableColumn[i].label
- const value = this.productTableList.tableColumn[i].prop
- this.searchProductOptions.push({ value: value, label: label })
- }
-
- this.productTableList.allcol = this.productTableList.tableColumn
- .filter((ele) => !ele.default)
- .map((ele) => ele.label)
- console.log("this.productTableList", this.productTableList)
- },
- selProductTableCol(val) {
- this.showProductCol = val
- this.productTableList.tableColumn = this.setProductColumnVisible(val)
- },
- // 璇锋眰鏁版嵁
- getData() {
- this.getSupplierList()
- },
- // 渚涘簲鍟嗗垪琛�
- async getSupplierList() {
- await getSupplierList({
- name: this.searchSupplierName,
- page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
- }).then((res) => {
- console.log(res)
- if (res.code === 200) {
- const list = res.data.list.map((item) => {
- return {
- ...item,
- id: item.id,
- status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
- }
- })
- console.log(list)
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.total
- if (list && list.length > 0) {
- this.supplierId = this.tableList.tableInfomation[0].id
- this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {}
- } else {
- this.supplierId = 0
- }
- // this.$nextTick(() => {
- // this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
- // })
-
- // 閲嶆柊鑾峰彇渚涘簲鍟嗗垪琛ㄥ悗搴旇閲嶇疆浜у搧鍒楄〃椤电爜
- this.productPagerOptions.currPage = 1
- // 濡傛灉渚涘簲鍟嗗垪琛ㄤ负绌�,鍒欏彲鎻愪緵浜у搧鍒楄〃涔熷簲涓虹┖
- if (list.length) {
- this.getProductList()
- } else {
- this.productTableList.tableInfomation = []
- this.productPagerOptions.currPage = 1
- this.productPagerOptions.totalCount = 0
- }
- }
- })
- },
- // 浜у搧鍒楄〃
- async getProductList(val, content) {
- console.log(val, content)
- await getProductList({
- [val]: content,
- supplierId: this.supplierId,
- page: this.productPagerOptions.currPage,
- pageSize: this.productPagerOptions.pageSize
- }).then((res) => {
- let list = res.data.list.map((item) => {
- return {
- ...item
- }
- })
- this.productTableList.tableInfomation = list || []
- this.productPagerOptions.totalCount = res.data.total
- })
- },
- // 鎼滅储渚涘簲鍟�
- onFilterSearch(searchText) {
- this.searchSupplierName = searchText ?? ""
- this.pagerOptions.currPage = 1
- this.getSupplierList()
- },
- // 鎼滅储浜у搧
- onProductFilterSearch(searchText) {
- this.productPagerOptions.currPage = 1
- this.getProductList("name", searchText)
- },
- // 鏂板缓渚涘簲鍟�
- addBtnClick() {
- this.editConfig.visible = true
- this.editConfig.title = "鏂板缓"
- this.editConfig.infomation = {
- fileId: 0,
- responsiblePersonName: document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")
- }
- },
- // 鍚敤渚涘簲鍟�
- async enableClick(row, value) {
- let status = value === "鍚敤" ? 1 : 0
- await changeSupplierStatus({
- id:Number(row.id),
- status: status
- }).then((res) => {
- if (res.code === 200) {
- this.$message.success("鐘舵�佷慨鏀规垚鍔�")
- this.getData()
- }
- })
- },
- // 淇敼渚涘簲鍟�
- modifyClick(row) {
- this.editConfig.visible = true
- this.editConfig.title = "淇敼"
- this.editConfig.infomation = { ...row, file_name: row.contract.fileName }
- },
- // 鐩稿叧渚涘簲鍟�
- raleteClick(row) {
- console.log(row)
- this.raleteSupplierConfig.visible = true
- this.raleteSupplierConfig.infomation = { ...row }
- },
- // 娣诲姞鏂颁骇鍝�
- addNewProductClick() {
- this.newProductConfig.visible = true
- this.newProductConfig.title = "娣诲姞"
- this.newProductConfig.infomation = { supplierId: this.supplierId }
- },
- // 淇敼浜у搧
- editClick(row) {
- this.newProductConfig.visible = true
- this.newProductConfig.title = "淇敼"
- this.newProductConfig.infomation = { ...row }
- },
- // 鍒犻櫎
- delClick(row) {
- this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- })
- .then(() => {
- deleteProduct({ id: row.id }).then((response) => {
- if (response.code === 200) {
- this.$message.success("鍒犻櫎鎴愬姛")
- this.getProductList()
- } else {
- this.$message.warning("鍒犻櫎澶辫触")
- }
- })
- })
- .catch(() => {})
- },
- getSelectArray(val) {
- console.log(val)
- this.selValueList = []
- const list = val.map((item) => {
- return item.id
- })
- this.selValueList = list
- },
- tableRowClick(row) {
- this.productPagerOptions.currPage = 1
- this.selectRow = row
- this.supplierId = row.id
- this.getProductList()
- },
- // 璇︽儏
- async selCommonClick(row) {
- await getPurchaseList({ pageSize: 10, page: 1, supplierId: Number(row.id) }).then((res) => {
- this.commonDetail.productListInfo = res.data.list
- })
- this.commonDetail.visible = true
- this.commonDetail.infomation = { ...row }
- },
- // 浜у搧鍒楄〃缈婚〉
- productChangeHandler(val) {
- this.productPagerOptions.currPage = 1
- this.productPagerOptions.pageSize = val
- this.getProductList()
- },
- currentProductHandler(val) {
- this.productPagerOptions.currPage = val
- this.getProductList()
- },
- // 鍒涘缓閲囪喘鍗�
- creatPurchase() {
- this.editPurchaseConfig.visible = true
- this.editPurchaseConfig.title = "鏂板缓"
- this.editPurchaseConfig.infomation = {
- supplierId: this.selectRow.id,
- purchaseTypeId:"2",
- supplierName: this.selectRow.name
- }
- }
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.supplier {
- height: 100%;
- overflow: hidden;
- .top {
- position: relative;
- height: 55%;
- .body {
- position: relative;
- height: calc(100% - 92px);
- }
- }
- .bottom {
- position: relative;
- height: 45%;
- .body {
- position: relative;
- height: calc(100% - 40px);
- padding-top: 0;
- }
- }
- .filter {
- height: 80px;
- display: flex;
- align-items: center;
- padding: 12px 20px 0 20px;
- &-card {
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 10px 20px;
- flex: 1;
- border-radius: 12px;
- background-color: #fff;
- }
- }
- .simple-filter {
- height: 40px;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- padding: 0 20px;
- &-card {
- height: 80px;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- flex: 1;
- }
- }
- .body {
- box-sizing: border-box;
- padding: 10px 20px;
- border-radius: 12px;
- .body-card {
- background-color: #fff;
- border-radius: 12px;
- height: 100%;
- overflow: hidden;
- }
-
- .supplier-search {
- display: flex;
- align-items: center;
- .add-view {
- margin-left: auto;
- margin-right: 20px;
- }
- }
- .list-view {
- height: calc(100% - 60px);
- overflow: hidden;
- }
- .btn-pager {
- display: flex;
- .page {
- margin-left: auto;
- }
- }
- }
-}
-.sub-title {
- flex-shrink: 0;
- margin-right: 20px;
- font-size: 16px;
- font-weight: bold;
- height: 28px;
- line-height: 28px;
- position: relative;
- padding-left: 12px;
- &-decorator {
- position: absolute;
- height: 100%;
- width: 4px;
- background-color: #2a78fb;
- top: 0;
- left: 0;
- }
-}
-</style>
diff --git a/vue.config.js b/vue.config.js
index d8343db..edefb27 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -12,17 +12,21 @@
lintOnSave: false,
productionSourceMap: false, // 濡傛灉浣犱笉闇�瑕佺敓浜х幆澧冪殑source map, 鍙互灏嗗叾璁剧疆涓篺alse 浠ュ姞閫熺敓浜х幆澧冩瀯寤�
devServer: {
+ historyApiFallback: true,
+ allowedHosts: "all",
proxy: {
- "/api/menu":{
- target:"http://192.168.20.119:8001",
+ // "/api/menu": {
+ // target: "http://192.168.20.119:8001",
+ // ws: true,
+ // changeOrigin: true
+ // },
+ "/api-s": {
+ target: "http://192.168.20.119:9081",
ws: true,
changeOrigin: true
},
"/api": {
-
- // target: "http://192.168.20.118:8889", // http://192.168.20.119:8002 http://fai365.com:30150/
- // target: "http://192.168.20.120:8004",
- target: "http://192.168.20.119:8004", // http://192.168.20.119:8004 http://fai365.com:30150/
+ target: "http://192.168.20.119:8001",
ws: true,
changeOrigin: true
}
--
Gitblit v1.8.0