@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
]
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
node_modules
|
||||
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 就眠儀式
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@ -0,0 +1,31 @@
|
||||
# Info
|
||||
|
||||
This template should help get you started developing with Vue 3 and Typescript in Vite.
|
||||
|
||||
## Get Started
|
||||
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
|
||||
[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur).
|
||||
|
||||
## Type Support For `.vue` Imports in TS
|
||||
|
||||
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can use the following:
|
||||
|
||||
### If Using Volar
|
||||
|
||||
Run `Volar: Switch TS Plugin on/off` from VSCode command palette.
|
||||
|
||||
### If Using Vetur
|
||||
|
||||
1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json`
|
||||
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript
|
||||
3. Open `src/main.ts` in VSCode
|
||||
4. Open the VSCode command palette
|
||||
5. Search and run "Select TypeScript version" -> "Use workspace version"
|
||||
@ -0,0 +1,6 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
// We suggest you to commit this file into source control
|
||||
declare global {
|
||||
const layer: typeof import('@layui/layer-vue')['layer']
|
||||
}
|
||||
export {}
|
||||
@ -0,0 +1,57 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
DarkIcon: typeof import('./src/components/DarkIcon.vue')['default']
|
||||
LayBody: typeof import('@layui/layui-vue')['LayBody']
|
||||
LayButton: typeof import('@layui/layui-vue')['LayButton']
|
||||
LayCard: typeof import('@layui/layui-vue')['LayCard']
|
||||
LayCheckbox: typeof import('@layui/layui-vue')['LayCheckbox']
|
||||
LayCol: typeof import('@layui/layui-vue')['LayCol']
|
||||
LayCollapse: typeof import('@layui/layui-vue')['LayCollapse']
|
||||
LayCollapseItem: typeof import('@layui/layui-vue')['LayCollapseItem']
|
||||
LayColorPicker: typeof import('@layui/layui-vue')['LayColorPicker']
|
||||
LayConfigProvider: typeof import('@layui/layui-vue')['LayConfigProvider']
|
||||
LayContainer: typeof import('@layui/layui-vue')['LayContainer']
|
||||
LayDatePicker: typeof import('@layui/layui-vue')['LayDatePicker']
|
||||
LayDropdown: typeof import('@layui/layui-vue')['LayDropdown']
|
||||
LayDropdownMenu: typeof import('@layui/layui-vue')['LayDropdownMenu']
|
||||
LayDropdownMenuItem: typeof import('@layui/layui-vue')['LayDropdownMenuItem']
|
||||
LayFooter: typeof import('@layui/layui-vue')['LayFooter']
|
||||
LayForm: typeof import('@layui/layui-vue')['LayForm']
|
||||
LayFormItem: typeof import('@layui/layui-vue')['LayFormItem']
|
||||
LayFullscreen: typeof import('@layui/layui-vue')['LayFullscreen']
|
||||
LayHeader: typeof import('@layui/layui-vue')['LayHeader']
|
||||
LayIcon: typeof import('@layui/icons-vue')['LayIcon']
|
||||
LayInput: typeof import('@layui/layui-vue')['LayInput']
|
||||
LayLayer: typeof import('@layui/layer-vue')['LayLayer']
|
||||
LayLayout: typeof import('@layui/layui-vue')['LayLayout']
|
||||
LayLogo: typeof import('@layui/layui-vue')['LayLogo']
|
||||
LayMenu: typeof import('@layui/layui-vue')['LayMenu']
|
||||
LayMenuItem: typeof import('@layui/layui-vue')['LayMenuItem']
|
||||
LayProgress: typeof import('@layui/layui-vue')['LayProgress']
|
||||
LayQuote: typeof import('@layui/layui-vue')['LayQuote']
|
||||
LayRadio: typeof import('@layui/layui-vue')['LayRadio']
|
||||
LayRow: typeof import('@layui/layui-vue')['LayRow']
|
||||
LayScroll: typeof import('@layui/layui-vue')['LayScroll']
|
||||
LaySelect: typeof import('@layui/layui-vue')['LaySelect']
|
||||
LaySelectOption: typeof import('@layui/layui-vue')['LaySelectOption']
|
||||
LaySide: typeof import('@layui/layui-vue')['LaySide']
|
||||
LaySubMenu: typeof import('@layui/layui-vue')['LaySubMenu']
|
||||
LaySwitch: typeof import('@layui/layui-vue')['LaySwitch']
|
||||
LayTab: typeof import('@layui/layui-vue')['LayTab']
|
||||
LayTabItem: typeof import('@layui/layui-vue')['LayTabItem']
|
||||
LayTable: typeof import('@layui/layui-vue')['LayTable']
|
||||
LayTextarea: typeof import('@layui/layui-vue')['LayTextarea']
|
||||
LayTooltip: typeof import('@layui/layui-vue')['LayTooltip']
|
||||
LayUpload: typeof import('@layui/layui-vue')['LayUpload']
|
||||
LightIcon: typeof import('./src/components/LightIcon.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
@ -0,0 +1 @@
|
||||
import{v as n}from"./index.b3f8b7f1.js";async function r(a){var t=[];return await n.post("/api/Common/GetBasicList",{FType:a}).then(e=>{t=e.Data.sort(function(s,o){return s.FOrder>o.FOrder})}),t}async function u(a,t){let e=0;return await n.post("/api/"+t+"/GetDataModel",a).then(s=>{e=s.Data}),e}async function l(a,t){let e=0;return await n.post("/api/"+t+"/UpdateDataModel",a).then(s=>{e=s.Data}),e}async function c(a,t){let e=0;return await n.post("/api/"+t+"/InsertDataModel",a).then(s=>{e=s.Data}),e}async function p(a,t){let e=0;return await n.post("/api/"+t+"/DeleteDataById",{FID:a.FID||a}).then(s=>{e=s.Data}),e}async function D(a,t){a=a||{FPageIndex:1,FPageSize:10};let e={};return await n.post("/api/"+t+"/GetPageList",a).then(s=>{e=s}),e}async function f(a,t){let e={};return await n.post("/api/"+t+"/Save",a).then(s=>{e=s}),e}async function m(a){let t="";return await n.post("/api/Common/GetTempFile",{FType:a||1}).then(e=>{t=e.Data}),t}async function C(a){let t={};return await n.post("/api/Common/CheckIsHasPower",a).then(e=>{t=e.Data}),t}async function d(a){let t={};return await n.post("/api/Common/GetDataCodeList",a).then(e=>{t=e.Data}),t}async function h(){let a={};return await n.post("/api/Common/GetConfigList",{}).then(t=>{a=t.Data}),a}async function y(a){let t={};return await n.post("/api/Common/GetConfigValue",{FID:a}).then(e=>{t=e.Data}),t}async function g(a){let t={};return await n.post("/api/Common/StateDataCode",{FID:a}).then(e=>{t=e.Data}),t}async function w(a){let t={};return await n.post("/api/Common/DeleteDataCode",{FID:a}).then(e=>{t=e.Data}),t}async function F(a){let t={};return await n.post("/api/Common/ChangeDataCode",a).then(e=>{t=e.Data}),t}export{u as a,d as b,r as c,f as d,C as e,m as f,D as g,p as h,c as i,F as j,h as k,w as l,y as m,g as s,l as u};
|
||||
@ -0,0 +1 @@
|
||||
import{v as o}from"./index.b3f8b7f1.js";async function c(){var t=[];return await o.post("/api/Factory/GetFactoryList").then(a=>{t=a.Data}),t}async function i(t,a){let e=0;return await o.post("/api/Factory/CheckHasCode",{FID:t,FCode:a}).then(r=>{e=r.Data}),e}export{i as c,c as g};
|
||||
@ -0,0 +1 @@
|
||||
import{_ as C,r as h,u as k,g as w,a as L,o as r,c as p,w as n,b as H,d as s,e as t,t as i,f as D,h as S,n as N,F as z,i as T,j as P,k as E,l as M,m as A,p as B,q as I,s as V}from"./index.b3f8b7f1.js";/* empty css */import{g as $}from"./common.d8f31935.js";const O={setup(){let a=[{title:"\u9500\u552E\u53F7",key:"FSaleCode",align:"center"},{title:"\u53D1\u8D77\u65F6\u95F4",key:"FAddDate",align:"center",width:"182px"},{title:"\u5F53\u524D\u6D41\u7A0B",key:"FName",align:"center",width:"200px"},{title:"\u4E8B\u9879\u72B6\u6001",key:"FState",align:"center",width:"98px"},{title:"\u4EFB\u52A1\u6765\u6E90",key:"FDesc",align:"center"}];const o=h([]),l=h([" "," "," "," "]),e=h(""),f=k(),_=h([]);return{topCount:l,dataColumn:a,dataList:o,tableHeight:e,routerInfo:f,fastList:_}},mounted(){this._getHomeTopCount();let a=parseInt(this.$refs["lay-row3-div"].offsetHeight)-100;this.tableHeight=a+"px",this._getHomeFast(),this._getHomeNeed(a/40)},methods:{async _getHomeTopCount(){this.topCount=await w()||[0,0,0,0]},async _getHomeFast(){let a=await L({}),o=[];a.forEach(l=>{l.FChild.forEach(e=>{e.FName.indexOf("\u5168\u90E8")==-1&&e.FName.indexOf("\u7BA1\u7406")==-1&&o.length<8&&o.push(e)})}),this.fastList=o},async _getHomeNeed(a){let o={FPageIndex:1,FPageSize:Math.floor(a)};o.FPageSize=o.FPageSize<5?5:o.FPageSize;let l=await $(o,"Task");l.Data.List=l.Data.List||[],l.Data.List.forEach(e=>{e.FAddDate=e.FAddDate==null?"":this.dateFormat(e.FAddDate),e.FState=e.FState==2?"\u5DF2\u5B8C\u6210":"\u8FDB\u884C\u4E2D"}),this.dataList=l.Data.List||[]},dateFormat(a){return a.replace("T"," ").split(".")[0]},_goToMore(a){let o="";a==-1?o="/need/all":o=this.fastList[a].FRemark,this.routerInfo.push(o)}}},R=t("div",{class:"height20"},null,-1),j={class:"home-box1"},q={class:"icon"},G={class:"desc"},J={class:"count"},K=t("label",null,"\u672A\u5B8C\u4EE3\u529E\u4E8B\u9879",-1),Q={class:"home-box1"},U={class:"icon c1"},W={class:"desc"},X={class:"count"},Y=t("label",null,"\u4ECA\u65E5\u65B0\u589E\u5F85\u529E",-1),Z={class:"home-box1"},tt={class:"icon c2"},et={class:"desc"},ot={class:"count"},st=t("label",null,"\u534F\u540C\u8DEF\u7EBF",-1),at={class:"home-box1"},nt={class:"icon c3"},lt={class:"desc"},ct={class:"count"},it=t("label",null,"\u6211\u53C2\u4E0E\u7684\u8DEF\u7EBF",-1),_t=t("div",{class:"height10"},null,-1),dt={class:"lay-row2"},ht=t("h1",null,"\u5FEB\u6377\u5165\u53E3",-1),rt=["title"],ut={class:"lay-row3"},mt={class:"lay-row3-div",ref:"lay-row3-div"},pt={class:"home-box3"},ft=t("h1",null,"\u6700\u65B0\u5F85\u529E\u4E8B\u9879",-1);function gt(a,o,l,e,f,_){const F=P,d=E,c=M,g=A,y=B,b=I,v=V,x=H;return r(),p(x,{class:"home-layout"},{default:n(()=>[s(y,null,{default:n(()=>[s(F,{fluid:"true",style:{padding:"10px"}}),R,s(g,{space:"10"},{default:n(()=>[s(c,{md:"6"},{default:n(()=>[t("div",j,[t("p",q,[s(d,{type:"layui-icon-note",size:"26px"})]),t("p",G,[t("label",J,i(e.topCount[0]),1),K])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",Q,[t("p",U,[s(d,{type:"layui-icon-form",size:"26px"})]),t("p",W,[t("label",X,i(e.topCount[1]),1),Y])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",Z,[t("p",tt,[s(d,{type:"layui-icon-slider",size:"26px"})]),t("p",et,[t("label",ot,i(e.topCount[2]),1),st])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",at,[t("p",nt,[s(d,{type:"layui-icon-download-circle",size:"26px"})]),t("p",lt,[t("label",ct,i(e.topCount[3]),1),it])])]),_:1})]),_:1})]),_:1}),s(y,{class:"layui-header2"},{default:n(()=>[_t,t("div",dt,[s(g,{space:"10"},{default:n(()=>[s(c,{md:"24"},{default:n(()=>[ht]),_:1}),(r(!0),D(z,null,S(e.fastList,(u,m)=>(r(),p(c,{md:"3",key:m,onClick:yt=>_._goToMore(m)},{default:n(()=>[t("div",{class:N("home-box2 c"+m),title:u.FName},i(u.FName),11,rt)]),_:2},1032,["onClick"]))),128))]),_:1})])]),_:1}),s(v,null,{default:n(()=>[t("div",ut,[t("div",mt,[t("div",pt,[t("h2",{onClick:o[0]||(o[0]=u=>_._goToMore(-1))},"\u70B9\u51FB\u67E5\u770B\u66F4\u591A\u5F85\u529E\u4E8B\u9879"),ft]),e.tableHeight!=""?(r(),p(b,{key:0,height:e.tableHeight,columns:e.dataColumn,dataSource:e.dataList},null,8,["height","columns","dataSource"])):T("",!0)],512)])]),_:1})]),_:1})}var xt=C(O,[["render",gt]]);export{xt as default};
|
||||
@ -0,0 +1 @@
|
||||
.height20{height:20px;display:block}.height10{height:10px;display:block}.height30{height:30px;display:block}.home-layout .layui-header{text-align:center;min-height:148px;height:auto;background-color:unset;overflow-x:hidden}.home-layout .layui-header2{min-height:194px}.home-layout .layui-body{display:flex;align-items:center;justify-content:center;margin:10px auto;overflow-x:hidden}.home-box1{width:70%;display:inline-block;text-align:center;line-height:100px;height:100px;border-radius:4px;overflow:hidden}.home-box1 p{display:inline-block;height:100px;overflow:hidden;position:relative;border-radius:4px 0 0 4px;color:#fff}.home-box1 .icon{width:40%;background:#FD4D4F}.home-box1 .icon.c1{background:#32BDB6}.home-box1 .icon.c2{background:#AAEB0E}.home-box1 .icon.c3{background:#597CF4}.home-box1 .desc{width:calc(60% - 2px);background:#FFF;color:#444;padding:20px 0;height:58px;color:#595959;border:1px solid rgba(187,187,187,100);border-radius:0 4px 4px 0}.home-box1 .desc label{display:block;line-height:28px}.home-box1 .desc .count{font-size:24px}.lay-row2{background:#fff;width:95%;display:block;overflow:hidden;margin:0 auto;padding:20px}.lay-row2 h1{color:#101010;font-weight:700;text-align:left;margin-bottom:5px}.home-box2{height:94px;width:110px;display:block;background:#000;line-height:94px;border-radius:4px;cursor:pointer;margin-bottom:10px;color:#fff;font-size:12px}.home-box2.c0{background:#36cfca}.home-box2.c1{background:#597cf4}.home-box2.c2{background:#e99d42}.home-box2.c3{background:#36cf3c}.home-box2.c4{background:#F4595c}.home-box2.c5{background:#31BDEC}.home-box2.c6{background:#FF5722}.home-box2.c7{background:#AAEB0E}.lay-row3{background:#fff;width:95%;display:block;overflow:hidden;margin:0 auto;padding:0 20px 20px;height:calc(100% - 40px)}.lay-row3-div{display:block;overflow:hidden;margin-bottom:20px;clear:both;height:100%}.lay-row3 .home-box3{height:60px;line-height:60px;margin-top:4px}.lay-row3 .home-box3 h1{font-weight:700;display:inline-block}.lay-row3 .home-box3 h2{font-weight:400;color:#168add;display:inline-block;float:right;font-size:14px;margin-right:2px;cursor:pointer}
|
||||
@ -0,0 +1 @@
|
||||
.layui-collapse{border-width:1px;border-style:solid;border-radius:2px}.layui-colla-content,.layui-colla-item{border-top-width:1px;border-top-style:solid}.layui-colla-item:first-child{border-top:none}.layui-colla-title{position:relative;height:42px;line-height:42px;padding:0 15px 0 35px;color:#333;background-color:var(--global-neutral-color-1);cursor:pointer;font-size:14px;overflow:hidden}.layui-colla-content{padding:10px 15px;line-height:1.6;color:#666}.layui-colla-icon{position:absolute;left:15px;top:0;font-size:14px}
|
||||
@ -0,0 +1 @@
|
||||
.layui-radio[size=lg] .layui-form-radio>i{font-size:24px}.layui-radio[size=md] .layui-form-radio>i{font-size:22px}.layui-radio[size=sm] .layui-form-radio>i{font-size:20px}.layui-radio[size=xs] .layui-form-radio>i{font-size:18px}.layui-radio input[type=radio]{display:none}.layui-form-radio,.layui-form-radio *{display:inline-block;vertical-align:middle}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio *{font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:var(--global-neutral-color-8)}.layui-form-radio:hover *,.layui-form-radioed,.layui-form-radioed>i{color:var(--global-checked-color)}.layui-radio-disabled>i{color:var(--global-neutral-color-3)!important}.layui-radio-disabled *{color:var(--global-neutral-color-8)!important}
|
||||
@ -0,0 +1 @@
|
||||
import r from"./all.b1b3f398.js";import{_ as n,r as p,J as e,o as m,c as s}from"./index.b3f8b7f1.js";/* empty css *//* empty css */import"./all.b6bc6e53.js";/* empty css */import"./common.d8f31935.js";import"./factory.c30f2aec.js";import"./materialType.f34aeb6a.js";import"./package.94c98454.js";/* empty css */const c={components:{AllData:r},setup(){return{dataInfoObj:p(2)}}};function i(o,f,l,t,_,d){const a=e("AllData");return m(),s(a,{dataInfoObj:t.dataInfoObj},null,8,["dataInfoObj"])}var B=n(c,[["render",i]]);export{B as default};
|
||||
@ -0,0 +1 @@
|
||||
import r from"./all.b1b3f398.js";import{_ as n,r as p,J as e,o as c,c as m}from"./index.b3f8b7f1.js";/* empty css *//* empty css */import"./all.b6bc6e53.js";/* empty css */import"./common.d8f31935.js";import"./factory.c30f2aec.js";import"./materialType.f34aeb6a.js";import"./package.94c98454.js";/* empty css */const s={components:{AllData:r},setup(){return{dataInfoObj:p(1)}}};function i(o,f,l,t,_,d){const a=e("AllData");return c(),m(a,{dataInfoObj:t.dataInfoObj},null,8,["dataInfoObj"])}var v=n(s,[["render",i]]);export{v as default};
|
||||
@ -0,0 +1 @@
|
||||
import{_ as e}from"./index.b3f8b7f1.js";const r={name:"log.vue"};function o(t,a,n,s,_,c){return" 111 "}var f=e(r,[["render",o]]);export{f as default};
|
||||
@ -0,0 +1 @@
|
||||
.content-box[data-v-36abbda6]{height:744px;display:block;position:relative;clear:both;float:none}.edit-box[data-v-36abbda6]{display:block;width:99%;text-align:center;margin:0 auto;clear:both;float:none}.edit-info[data-v-36abbda6]{margin:20px .75% 10px 0;width:47%;padding-left:1%;padding-right:1%;display:inline-block}.edit-info+.edit-info[data-v-36abbda6]{margin-left:.75%;margin-right:0}.layui-form-item[data-v-36abbda6]{margin-bottom:16px}.content-box[data-v-cde57ee0]{height:400px;margin:20px 10px;display:block;position:relative;clear:both;float:none}
|
||||
@ -0,0 +1 @@
|
||||
import{v as n}from"./index.b3f8b7f1.js";async function r(t){let a={};return await n.post("/api/MaterialType/GetInfoData",t||{}).then(e=>{a=e.Data}),a}async function i(t){let a=0;return await n.post("/api/MaterialType/ChangeInfoData",t).then(e=>{a=e.Data||0}),a}export{i as c,r as g};
|
||||
@ -0,0 +1 @@
|
||||
.edit-info[data-v-35b794fc]{padding-right:30px;margin:20px auto;overflow:hidden}.empty-small2[data-v-35b794fc]{margin:0 auto 20px;display:block}.layui-form-item[data-v-35b794fc]{margin-bottom:16px;width:46%;float:left;display:block;clear:initial}.layui-form-item[data-v-35b794fc]:nth-child(even){float:right}.edit-info[data-v-ad53da44]{width:90%;padding-right:30px;margin:30px auto 10px}.menuBtn[data-v-ad53da44]{display:block;text-align:center;width:96%;margin:20px auto}.empty-small2[data-v-ad53da44]{max-width:96%;margin:0 auto}.empty-small2>.layui-btn[data-v-ad53da44]{margin-bottom:16px}.note[data-v-ad53da44]{color:#999;font-size:12px;margin:12px auto 2px;text-align:right}.edit-info[data-v-26720406]{margin:0 28px;display:block;clear:both;float:none;overflow:auto;height:290px}.float-clear[data-v-26720406]{overflow:hidden;display:block;clear:both;float:none;height:0}.menuBtn[data-v-26720406]{display:block;text-align:center;width:96%;margin:10px auto}.empty-small2[data-v-26720406]{max-width:96%;margin:20px auto;display:block}.empty-small2>.layui-btn[data-v-26720406]{margin-bottom:16px}.note[data-v-26720406]{color:#999;font-size:12px;margin:12px auto 2px;text-align:right}
|
||||
@ -0,0 +1 @@
|
||||
import{v as n}from"./index.b3f8b7f1.js";async function i(t){let a={};return await n.post("/api/Package/GetPackageChildList",t).then(e=>{a=e}),a}async function s(t){let a=0;return await n.post("/api/Package/DeletePackageChild",{FID:t}).then(e=>{a=e.Data}),a}async function o(t){let a=0;return await n.post("/api/Package/GetPackageInfo",t).then(e=>{a=e.Data}),a}async function l(t){let a=0;return await n.post("/api/Package/UpdatePackageData",t).then(e=>{a=e.Data}),a}async function u(t){let a=0;return await n.post("/api/Package/DockMDMCode",t).then(e=>{a=e.Data}),a}async function p(t){let a=0;return await n.post("/api/Package/NoSupplyPackageChild",t).then(e=>{a=e.Data}),a}export{i as a,s as b,u as d,o as g,p as n,l as u};
|
||||
@ -0,0 +1 @@
|
||||
:root{--textarea-border-radius: var(--global-border-radius);--textarea-border-color: var(--global-neutral-color-3)}.layui-textarea{border-width:1px;border-style:solid;background-color:#fff;color:#000000d9;border-radius:var(--textarea-border-radius);border-color:var(--textarea-border-color);display:block;width:100%;height:auto;line-height:20px;min-height:100px;padding:6px 10px;resize:vertical;position:relative}.layui-textarea-wrapper{position:relative}.layui-textarea:hover{border-color:#eee!important}.layui-textarea:focus{border-color:#d2d2d2!important}.layui-textarea-clear{position:absolute;color:#00000073;right:10px;top:10px}.layui-textarea::-webkit-input-placeholder{line-height:1.3}.layui-texterea-count{text-align:right;color:inherit;white-space:nowrap;pointer-events:none;margin-top:4px}.power-box[data-v-41fb242c]{display:block;height:75vh}.tab-box[data-v-41fb242c]{max-width:96%;margin:20px auto 0}.menuBtn[data-v-41fb242c]{display:block;text-align:center;width:96%;position:absolute;bottom:38px}.mb4[data-v-41fb242c],.mb5[data-v-41fb242c]{position:relative;margin-top:70px}.view-box[data-v-41fb242c]{padding-left:16px;display:block}.layui-checkbox[data-v-41fb242c]{margin-bottom:16px;display:inline-block}
|
||||
@ -0,0 +1 @@
|
||||
.dataInfo[data-v-dcc53da0]{max-width:90%;margin:30px auto;padding-right:30px;overflow-y:auto}.layui-item33[data-v-03d64be6]{width:90%;padding-right:30px;margin:30px auto 10px;display:block;overflow:auto;position:relative;clear:both}.menuBtn[data-v-03d64be6]{display:block;text-align:center;width:96%;margin:20px auto}.empty-small2[data-v-03d64be6]{max-width:96%;margin:0 auto}.empty-small2>.layui-btn[data-v-03d64be6]{margin-bottom:16px}.title-materail[data-v-03d64be6]{margin:8px 10px 0 0;vertical-align:middle;text-align:right}.data-materail[data-v-03d64be6]{margin:0 20px 0 0}
|
||||
@ -0,0 +1 @@
|
||||
import{S as p}from"./all.b6bc6e53.js";import{_ as r,r as a,J as n,o as s,c}from"./index.b3f8b7f1.js";/* empty css *//* empty css *//* empty css */import"./common.d8f31935.js";import"./factory.c30f2aec.js";import"./materialType.f34aeb6a.js";import"./package.94c98454.js";/* empty css */const m={components:{AllData:p},setup(){return{pageTypeObj:a(2)}}};function i(o,l,_,t,f,u){const e=n("AllData");return s(),c(e,{pageTypeObj:t.pageTypeObj},null,8,["pageTypeObj"])}var A=r(m,[["render",i]]);export{A as default};
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>配方物料协同系统</title>
|
||||
<style>
|
||||
.loader-main {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: whitesmoke;
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
.loader {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 30px auto 40px;
|
||||
margin-top: 20%;
|
||||
position: relative;
|
||||
z-index: 999999;
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
.loader:before {
|
||||
content: "";
|
||||
width: 50px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #000;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
top: 59px;
|
||||
left: 0;
|
||||
animation: shadow 0.5s linear infinite;
|
||||
}
|
||||
|
||||
.loader:after {
|
||||
content: "";
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 3px;
|
||||
background-color: #5fb878;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: loading 0.5s linear infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes loading {
|
||||
17% {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: translateY(9px) rotate(22.5deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
|
||||
border-bottom-right-radius: 40px;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(9px) rotate(67.5deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
17% {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: translateY(9px) rotate(22.5deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
|
||||
border-bottom-right-radius: 40px;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(9px) rotate(67.5deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes shadow {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes shadow {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.2, 1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index.b3f8b7f1.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index.51079297.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="loader-main">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,131 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>配方物料协同系统</title>
|
||||
<style>
|
||||
.loader-main {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: whitesmoke;
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
.loader {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 30px auto 40px;
|
||||
margin-top: 20%;
|
||||
position: relative;
|
||||
z-index: 999999;
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
.loader:before {
|
||||
content: "";
|
||||
width: 50px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #000;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
top: 59px;
|
||||
left: 0;
|
||||
animation: shadow 0.5s linear infinite;
|
||||
}
|
||||
|
||||
.loader:after {
|
||||
content: "";
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 3px;
|
||||
background-color: #5fb878;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: loading 0.5s linear infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes loading {
|
||||
17% {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: translateY(9px) rotate(22.5deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
|
||||
border-bottom-right-radius: 40px;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(9px) rotate(67.5deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
17% {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
25% {
|
||||
transform: translateY(9px) rotate(22.5deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(18px) scale(1, 0.9) rotate(45deg);
|
||||
border-bottom-right-radius: 40px;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(9px) rotate(67.5deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes shadow {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes shadow {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: scale(1, 1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.2, 1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="loader-main">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "layui-vue-admin",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc --noEmit --skipLibCheck && vite build",
|
||||
"serve": "vite preview",
|
||||
"commit": "git add . && git-cz && git push"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@layui/layui-vue": "^1.6.4",
|
||||
"axios": "^0.24.0",
|
||||
"commitizen": "^4.2.4",
|
||||
"pinia": "^2.0.9",
|
||||
"pinia-plugin-persist": "^1.0.0",
|
||||
"vue": "^3.2.47",
|
||||
"vue-router": "^4.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-runtime": "^7.18.9",
|
||||
"@types/node": "^18.6.2",
|
||||
"@vitejs/plugin-vue": "^2.2.0",
|
||||
"@vue/compiler-sfc": "^3.2.33",
|
||||
"cz-customizable": "^6.6.0",
|
||||
"less": "^4.1.2",
|
||||
"typescript": "^4.5.4",
|
||||
"unplugin-auto-import": "^0.7.2",
|
||||
"unplugin-layui-vue-resolver": "^0.0.12",
|
||||
"unplugin-vue-components": "^0.19.9",
|
||||
"vite": "^2.8.0",
|
||||
"vue-tsc": "^0.29.8"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "node_modules/cz-customizable"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
<style>
|
||||
#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layui-disabled,
|
||||
.layui-disabled:hover {
|
||||
color: var(--global-neutral-color-8) !important;
|
||||
}
|
||||
|
||||
.layui-laypage-skip .layui-input-number {
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: none !important;
|
||||
}
|
||||
|
||||
.layui-empty {
|
||||
text-align: center;
|
||||
min-height: 220px;
|
||||
padding: 60px 0 40px;
|
||||
}
|
||||
|
||||
.empty-small1 .layui-empty {
|
||||
padding: 41px 0 20px;
|
||||
}
|
||||
|
||||
.empty-small2 .layui-empty {
|
||||
padding: 6px 0 15px;
|
||||
}
|
||||
|
||||
.empty-small3 .layui-empty {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.empty-small3 .layui-empty img {
|
||||
max-height: 150px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.empty-small3 .layui-empty .layui-empty-description {
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
display: block;
|
||||
clear: both;
|
||||
border: 1px solid #eee;
|
||||
padding: 30px 10px 0;
|
||||
}
|
||||
|
||||
.search-items .layui-form-item {
|
||||
float: left;
|
||||
clear: inherit;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
display: block;
|
||||
text-align: right;
|
||||
margin-right: 21px;
|
||||
}
|
||||
|
||||
.layui-form-select {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.search-items .layui-input,
|
||||
.search-items .layui-form-label,
|
||||
.search-items .layui-form-select {
|
||||
line-height: 30px !important;
|
||||
height: 30px !important;
|
||||
}
|
||||
|
||||
.search-items .layui-input-wrapper,
|
||||
.search-items input {
|
||||
line-height: 28px !important;
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
.search-items .layui-form-label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.search-items .layui-input {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.layui-btn {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.layui-upload-wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute !important;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.layui-tab .layui-tab-title {
|
||||
background: whitesmoke !important;
|
||||
border-bottom: 4px solid #fff;
|
||||
}
|
||||
|
||||
.layui-tab .layui-this,
|
||||
.layui-fluid {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
.layui-table,
|
||||
.layui-table-view {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.color666 .layui-form-label {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.color999 .layui-disabled,
|
||||
.color999 .layui-disabled:hover {
|
||||
color: #999 !important;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* 包材子项添加的时候 */
|
||||
.table-box240 .layui-table-main {
|
||||
max-height: 240px;
|
||||
}
|
||||
|
||||
.table-box240 .layui-input {
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
.table-box240 .layui-table-cell {
|
||||
padding: 4px 8px !important;
|
||||
}
|
||||
|
||||
.table-box240 .layui-input input {
|
||||
text-align: center;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.table-box240 .layui-input {
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
.table-box240 .layui-btn {
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
|
||||
/* 大进度条,小的时候显示美观 */
|
||||
.layui-progress-big {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.row-select .layui-form-select {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.row-select td {
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.layui-progress-big .layui-progress-text {
|
||||
color: #555 !important;
|
||||
}
|
||||
|
||||
.layui-item33 .layui-form-item {
|
||||
min-width: 33.3%;
|
||||
float: left;
|
||||
clear: initial;
|
||||
}
|
||||
|
||||
.layui-item50 .layui-form-item {
|
||||
min-width: 50%;
|
||||
float: left;
|
||||
clear: initial;
|
||||
}
|
||||
|
||||
.sale-note {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.sale-note .layui-input {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.sale-note .layui-anim {
|
||||
top: 0 !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.layui-header .layui-nav .layui-nav-item>a * {
|
||||
color: #393d49 !important;
|
||||
}
|
||||
|
||||
.layui-inline[title='导出'],
|
||||
.layui-inline[title='打印'] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.layui-select {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,165 @@
|
||||
import http from '../http';
|
||||
|
||||
//获取导航菜单
|
||||
export async function getMenuList(param) {
|
||||
var menuList = [];
|
||||
param = param || { FPageSize: 20 };
|
||||
await http.post('/api/Common/GetPageList', param).then((data) => {
|
||||
menuList = data.Data.List.filter(s => s.FParentID == -1).sort(function(a, b) {
|
||||
return a.FOrder > b.FOrder;
|
||||
});
|
||||
menuList.forEach((item) => {
|
||||
item.FChild = (data.Data.List.filter(s => s.FParentID == item.FID) || []).sort(function(a, b) {
|
||||
return a.FOrder > b.FOrder;
|
||||
});
|
||||
});
|
||||
});
|
||||
return menuList;
|
||||
}
|
||||
|
||||
//获取配置集合
|
||||
export async function getBasicList(typeId) {
|
||||
var dataList = [];
|
||||
await http.post('/api/Common/GetBasicList', { FType: typeId }).then((data) => {
|
||||
dataList = data.Data.sort(function(a, b) { return a.FOrder > b.FOrder; });
|
||||
});
|
||||
return dataList;
|
||||
}
|
||||
|
||||
//获取信息
|
||||
export async function getDataModel(dataInfo, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/' + controller + '/GetDataModel', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//修改信息
|
||||
export async function updateDataInfo(dataInfo, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/' + controller + '/UpdateDataModel', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//新增信息
|
||||
export async function insertDataInfo(dataInfo, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/' + controller + '/InsertDataModel', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//删除信息
|
||||
export async function deleteDataById(dataId, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/' + controller + '/DeleteDataById', { FID: dataId.FID || dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取分页
|
||||
export async function getPageList(param, controller) {
|
||||
param = param || { FPageIndex: 1, FPageSize: 10 };
|
||||
let result = {};
|
||||
await http.post('/api/' + controller + '/GetPageList', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function GetFormulaPageList(param, controller) {
|
||||
param = param || { FPageIndex: 1, FPageSize: 10 };
|
||||
let result = {};
|
||||
await http.post('/api/' + controller + '/GetFormulaPageList', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//保存
|
||||
export async function commonSave(param, controller) {
|
||||
let result = {};
|
||||
await http.post('/api/' + controller + '/Save', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取模板信息
|
||||
export async function getTempFile(type) {
|
||||
let result = "";
|
||||
await http.post('/api/Common/GetTempFile', { FType: type || 1 }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//验证用户权限
|
||||
export async function checkIsHasPower(inData) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/CheckIsHasPower', inData).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取数据选择值
|
||||
export async function getDataCode(inData) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/GetDataCodeList', inData).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取配置集合
|
||||
export async function getConfigList() {
|
||||
let result = {};
|
||||
await http.post('/api/Common/GetConfigList', {}).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取系统配置值
|
||||
export async function getConfigValue(dataId) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/GetConfigValue', { FID: dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//修改数据值状态
|
||||
export async function stateDataCode(dataId) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/StateDataCode', { FID: dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//删除数据值
|
||||
export async function deleteDataCode(dataId) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/DeleteDataCode', { FID: dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//设置系统配置值
|
||||
export async function changeDataCode(inData) {
|
||||
let result = {};
|
||||
await http.post('/api/Common/ChangeDataCode', inData).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
import http from '../http';
|
||||
//获取工厂集合
|
||||
export async function getFactoryList() {
|
||||
var dataList = [];
|
||||
await http.post('/api/Factory/GetFactoryList').then((data) => {
|
||||
dataList = data.Data;
|
||||
});
|
||||
return dataList;
|
||||
}
|
||||
|
||||
//验证工厂代码是否重复
|
||||
export async function checkHasCode(id, code) {
|
||||
let result = 0;
|
||||
await http.post('/api/Factory/CheckHasCode', { FID: id, FCode: code }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
import http from '../http';
|
||||
|
||||
//获取信息数据
|
||||
export async function getInfoData(param) {
|
||||
let result = {};
|
||||
await http.post('/api/MaterialType/GetInfoData', param || {}).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//修改信息数据
|
||||
export async function changeInfoData(param) {
|
||||
let result = 0;
|
||||
await http.post('/api/MaterialType/ChangeInfoData', param).then((data) => {
|
||||
result = data.Data || 0;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
import http from '../http';
|
||||
|
||||
//获取子项集合
|
||||
export async function getPackageChildList(param) {
|
||||
let result = {};
|
||||
await http.post('/api/Package/GetPackageChildList', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//删除子项信息
|
||||
export async function deletePackageChild(dataId) {
|
||||
let result = 0;
|
||||
await http.post('/api/Package/DeletePackageChild', { FID: dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取包材信息
|
||||
export async function getPackageInfo(param) {
|
||||
let result = 0;
|
||||
await http.post('/api/Package/GetPackageInfo', param).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//操作包材信息
|
||||
export async function updatePackageData(param) {
|
||||
let result = 0;
|
||||
await http.post('/api/Package/UpdatePackageData', param).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//对接子项代码
|
||||
export async function dockMDMCode(param) {
|
||||
let result = 0;
|
||||
await http.post('/api/Package/DockMDMCode', param).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//不补充包材信息
|
||||
export async function noSupplyPackageChild(param) {
|
||||
let result = 0;
|
||||
await http.post('/api/Package/NoSupplyPackageChild', param).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
import http from '../http';
|
||||
|
||||
//物料组复核
|
||||
export async function reviewMaterialGroup(params: any) {
|
||||
let result = {};
|
||||
await http.post('/api/Task/ReviewMaterialGroup', params).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//组编号申请
|
||||
export async function dockMaterialGroup(params: any) {
|
||||
let result = {};
|
||||
await http.post('/api/Task/DockMaterialGroup', params).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//确认流程完成
|
||||
export async function sureTeamWork(teamId: number) {
|
||||
let result = 0;
|
||||
await http.post('/api/Task/SureTeamWork', { FTeamID: teamId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import http from '../http';
|
||||
|
||||
//获取协同集合
|
||||
export async function getTeamworkPageList(param) {
|
||||
param = param || { FPageIndex: 1, FPageSize: 10 };
|
||||
let result = {};
|
||||
await http.post('/api/Teamwork/GetTeamworkPageList', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取流程集合
|
||||
export async function getTeamProcessList(teamId) {
|
||||
let param = { FPageIndex: 1, FPageSize: 999, FTeamID: teamId };
|
||||
let result = [];
|
||||
await http.post('/api/Teamwork/GetTeamProcessList', param).then((data) => {
|
||||
result = data.Data.List || [];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取协同视图信息
|
||||
export async function getTeamworkView(param) {
|
||||
let result = {};
|
||||
await http.post('/api/Teamwork/GetTeamworkView', param).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//下载BOM
|
||||
export async function downloadBOM(teamId) {
|
||||
let param = { FTeamID: teamId };
|
||||
let result = [];
|
||||
await http.post('/api/Teamwork/DockDownBomData', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
import http from '../http';
|
||||
|
||||
//获取导航菜单
|
||||
export async function getMenuList(param) {
|
||||
var menuList = [];
|
||||
await http.post('/api/User/GetMenuList', param).then((data) => {
|
||||
menuList = data.Data.filter(s => s.FParentID == -1).sort(function(a, b) {
|
||||
return a.FOrder > b.FOrder;
|
||||
});
|
||||
menuList.forEach((item) => {
|
||||
item.FChild = (data.Data.filter(s => s.FParentID == item.FID) || []).sort(function(a, b) {
|
||||
return a.FOrder > b.FOrder;
|
||||
});
|
||||
});
|
||||
});
|
||||
return menuList;
|
||||
}
|
||||
|
||||
//获取角色集合(分页)
|
||||
export async function getRolePageList(param) {
|
||||
param = param || { FPageIndex: 1, FPageSize: 10 };
|
||||
let result = {};
|
||||
await http.post('/api/User/GetRolePageList', param).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取角色集合
|
||||
export async function getRoleList() {
|
||||
var dataList = [];
|
||||
await http.post('/api/User/GetRoleList').then((data) => {
|
||||
dataList = data.Data;
|
||||
});
|
||||
return dataList;
|
||||
}
|
||||
|
||||
//修改角色
|
||||
export async function updateRoleModel(dataInfo, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/User/UpdateRoleModel', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//新增角色
|
||||
export async function insertRoleModel(dataInfo, controller) {
|
||||
let result = 0;
|
||||
await http.post('/api/User/InsertRoleModel', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//删除角色信息
|
||||
export async function deleteRoleModel(dataId) {
|
||||
let result = 0;
|
||||
await http.post('/api/User/DeleteRoleModel', { FID: dataId }).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取权限信息(非菜单)
|
||||
export async function getBasicRoleList(dataInfo) {
|
||||
let result = [];
|
||||
await http.post('/api/User/GetBasicRoleList', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//保存权限信息
|
||||
export async function saveRolePower(dataInfo) {
|
||||
let result = 0;
|
||||
await http.post('/api/User/SaveRolePower', dataInfo).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//登出用户信息
|
||||
export async function loginOut(dataInfo) {
|
||||
let result = "";
|
||||
await http.post('/api/User/LoginOut', dataInfo || {}).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取首页数量
|
||||
export async function getHomeTopCount(dataInfo) {
|
||||
let result = "";
|
||||
await http.post('/api/User/GetHomeTopCount', dataInfo || {}).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//获取用户权限
|
||||
export async function GetPower(dataInfo) {
|
||||
|
||||
let result="";
|
||||
if(typeof(dataInfo.FID)=="undefined")
|
||||
{
|
||||
return result;
|
||||
}
|
||||
await http.post('/api/User/GetPower?userid='+dataInfo.FID,{}).then((data)=>{
|
||||
result=data.Data;
|
||||
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function CreatePower(list) {
|
||||
//alert(JSON.stringify(list));
|
||||
let result="";
|
||||
await http.post('/api/User/CreatePower',{list:list}).then((data)=>{
|
||||
result=data.Data;
|
||||
})
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
export async function GetPowerList() {
|
||||
let result="";
|
||||
await http.post('/api/User/GetPowerList').then((data)=>{
|
||||
result=data.Data;
|
||||
})
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
import http from '../http';
|
||||
|
||||
//根据协同ID获取物料视图
|
||||
export async function getListByTeamId(params) {
|
||||
let result = {};
|
||||
await http.post('/api/View/GetListByTeamId', params).then((data) => {
|
||||
result = data.Data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//保存视图编辑的内容
|
||||
export async function updateBatchById(params) {
|
||||
let result = {};
|
||||
await http.post('/api/View/UpdateBatchById', params).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
//保存视图编辑的内容
|
||||
export async function updateBatchById2(params) {
|
||||
let result = {};
|
||||
await http.post('/api/View/UpdateBatchById2', params).then((data) => {
|
||||
result = data;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -0,0 +1,92 @@
|
||||
import axios from 'axios'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
|
||||
const config = {
|
||||
timeout: 600000,
|
||||
//baseURL: "http://124.222.104.55:58178/",
|
||||
baseURL: "http://localhost:58178/",
|
||||
// baseURL: "http://plm-pw-test.hbflavor.com:81/",
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
async: false
|
||||
}
|
||||
// let userToken = "";
|
||||
// let userToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJGSUQiOjIsIkZVc2VyIjoib2F0ZXN0MiIsIkZOYW1lIjoi5rWL6K-V5bel5Y6CIiwiRkV4cGlyZVRpbWUiOiIyMDIzLTAxLTE3IDIwOjIwOjA1In0.ZNN-fVE1JJ3tN82pM9DylqqMMpMUVLZWJKTBwz8M3bU"
|
||||
let userToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJGSUQiOjIsIkZVc2VyIjoib2F0ZXN0MSIsIkZOYW1lIjoi6ZmI5YevX1RFU1QiLCJGRXhwaXJlVGltZSI6IjIwMjMtMDQtMTcgMjA6MjQ6MTYifQ.v00Pm6eqVNlA-TRTBAsmVPw1z7ZbO1Fd0S4mUi-_uzI"
|
||||
|
||||
//获取上传信息
|
||||
export function getUploadInfo(param: any) {
|
||||
let temps = param.url;
|
||||
param.url = config.baseURL + temps
|
||||
if (temps[0] == "/" && config.baseURL[config.baseURL.length - 1] == "/") {
|
||||
param.url = param.url.replace("/" + temps, temps);
|
||||
}
|
||||
param.headers = param.headers || {};
|
||||
param.headers.token = localStorage.getItem('token') || userToken;
|
||||
param.headers.ticket = getQueryString("ticket") || getQueryString("token") || "";
|
||||
return param;
|
||||
};
|
||||
|
||||
export const getQueryString = (name: string) => {
|
||||
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return decodeURIComponent(r[2]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
class Http {
|
||||
service: any;
|
||||
constructor(config: any) {
|
||||
this.service = axios.create(config)
|
||||
/* 请求拦截 */
|
||||
this.service.interceptors.request.use((config: any) => {
|
||||
config.headers.token = localStorage.getItem('token') || userToken;
|
||||
config.headers.ticket = getQueryString("ticket") || getQueryString("token") || "";
|
||||
return config;
|
||||
}, error => {
|
||||
console.log("error");
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
/* 响应拦截 */
|
||||
this.service.interceptors.response.use((response: any) => {
|
||||
const data = response.data;
|
||||
console.log(data)
|
||||
let ticket = data.Ticket || "";
|
||||
if (ticket && ticket.length > 10) {
|
||||
let index = ticket.indexOf("http");
|
||||
if (index != -1 && index < 5) window.location.href = ticket;
|
||||
else localStorage.setItem('token', ticket);
|
||||
}
|
||||
if (data.Code != "200") {
|
||||
let message = data.Message || `接口异常`;
|
||||
if (layer) {
|
||||
layer.msg(message, { time: 3000, icon: 2 });
|
||||
} else {
|
||||
alert(message);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
else {
|
||||
return data;
|
||||
}
|
||||
}, error => {
|
||||
layer.msg(error, { time: 3000, icon: 2 });
|
||||
return Promise.reject(error)
|
||||
});
|
||||
}
|
||||
|
||||
/* GET 方法 */
|
||||
get<T>(url: string, params?: object, _object = {}): Promise<any> {
|
||||
return this.service.get(url, { params, ..._object });
|
||||
}
|
||||
/* POST 方法 */
|
||||
post<T>(url: string, params?: object, _object = {}): Promise<any> {
|
||||
return this.service.post(url, params, _object);
|
||||
}
|
||||
}
|
||||
|
||||
export default new Http(config);
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="rgba(60, 60, 60, .7)" aria-hidden="true" focusable="false"
|
||||
viewBox="0 0 24 24" class="vt-switch-appearance-sun">
|
||||
<path
|
||||
d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z">
|
||||
</path>
|
||||
<path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path>
|
||||
<path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path>
|
||||
<path
|
||||
d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z">
|
||||
</path>
|
||||
<path
|
||||
d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z">
|
||||
</path>
|
||||
<path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path>
|
||||
<path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path>
|
||||
<path
|
||||
d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z">
|
||||
</path>
|
||||
<path
|
||||
d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z">
|
||||
</path>
|
||||
</svg>
|
||||
</template>
|
||||
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="rgba(60, 60, 60, .7)" aria-hidden="true" focusable="false"
|
||||
viewBox="0 0 24 24" class="vt-switch-appearance-moon">
|
||||
<path
|
||||
d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z">
|
||||
</path>
|
||||
</svg>
|
||||
</template>
|
||||
@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<lay-config-provider :themeVariable="appStore.themeVariable" :theme="appStore.theme">
|
||||
<lay-layout :class="[collapseState ? 'collapse' : '']">
|
||||
<!-- side -->
|
||||
<lay-side :width="sideWidth">
|
||||
<lay-logo v-if="collapseState" style="color:#fff;">华宝</lay-logo>
|
||||
<lay-logo v-else style="color:#fff;">配方物料协同系统</lay-logo>
|
||||
<lay-scroll style="height: calc(100% - 62px)">
|
||||
<global-menu :collapse="collapseState"></global-menu>
|
||||
</lay-scroll>
|
||||
</lay-side>
|
||||
<lay-layout style="width:0">
|
||||
<!-- header -->
|
||||
<lay-header style="position: relative;">
|
||||
<lay-menu class="layui-layout-left" @mouseleave="navBarOpacity=0,navBarWidth=0">
|
||||
<lay-menu-item @click="collapse" @mouseenter="mouseenter($event)">
|
||||
<lay-icon v-if="collapseState" type="layui-icon-spread-left"></lay-icon>
|
||||
<lay-icon v-else type="layui-icon-shrink-right"></lay-icon>
|
||||
</lay-menu-item>
|
||||
<lay-menu-item @click="refresh" @mouseenter="mouseenter($event)">
|
||||
<lay-icon type="layui-icon-refresh-one"></lay-icon>
|
||||
</lay-menu-item>
|
||||
</lay-menu>
|
||||
<lay-menu class="layui-layout-right" @mouseleave="navBarOpacity=0,navBarWidth=0">
|
||||
<lay-menu-item>
|
||||
<a href="javascript:void(0)">
|
||||
<lay-switch class="switch" v-model="appStore.theme" onswitch-value="dark"
|
||||
unswitch-value="light" onswitch-color="rgba(255, 255, 255, 0.05)"
|
||||
unswitch-color="rgba(255, 255, 255, 0.05)" style="display:inline-flex">
|
||||
<template #onswitch-icon>
|
||||
<light-icon></light-icon>
|
||||
</template>
|
||||
<template #unswitch-icon>
|
||||
<dark-icon></dark-icon>
|
||||
</template>
|
||||
</lay-switch>
|
||||
</a>
|
||||
</lay-menu-item>
|
||||
|
||||
<lay-menu-item @mouseenter="mouseenter($event)">
|
||||
<lay-fullscreen v-slot="{ enter, exit, isFullscreen }">
|
||||
<lay-icon type="layui-icon-screen-full" v-if="!isFullscreen" @click="enter()">
|
||||
</lay-icon>
|
||||
<lay-icon type="layui-icon-screen-restore" v-else @click="exit()"></lay-icon>
|
||||
</lay-fullscreen>
|
||||
</lay-menu-item>
|
||||
<!-- <lay-dropdown @mouseenter="mouseenter($event)">
|
||||
<lay-menu-item>
|
||||
<lay-icon type="layui-icon-notice"></lay-icon>
|
||||
</lay-menu-item>
|
||||
<template #content> 内容 </template>
|
||||
</lay-dropdown> -->
|
||||
<lay-dropdown @mouseenter="mouseenter($event)">
|
||||
<lay-menu-item>
|
||||
<lay-icon type="layui-icon-username"></lay-icon>
|
||||
</lay-menu-item>
|
||||
<template #content>
|
||||
<lay-dropdown-menu>
|
||||
<!-- <lay-dropdown-menu-item>用户信息</lay-dropdown-menu-item> -->
|
||||
<lay-dropdown-menu-item @click="_loginOutSure">注 销</lay-dropdown-menu-item>
|
||||
</lay-dropdown-menu>
|
||||
</template>
|
||||
</lay-dropdown>
|
||||
<lay-menu-item @click="changeVisible" @mouseenter="mouseenter($event)">
|
||||
<lay-icon type="layui-icon-more-vertical"></lay-icon>
|
||||
</lay-menu-item>
|
||||
</lay-menu>
|
||||
<span class="layui-nav-bar" style="top: 0;left:unset"
|
||||
:style="{opacity: navBarOpacity,width:navBarWidth+'px',left:navBarLeft+'px'}"></span>
|
||||
</lay-header>
|
||||
<!-- content -->
|
||||
<lay-body>
|
||||
<global-tab style="height: 42px;"></global-tab>
|
||||
<global-content></global-content>
|
||||
</lay-body>
|
||||
<lay-footer></lay-footer>
|
||||
</lay-layout>
|
||||
</lay-layout>
|
||||
<global-setup v-model="visible"></global-setup>
|
||||
</lay-config-provider>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
ref
|
||||
} from "vue";
|
||||
import DarkIcon from "../components/DarkIcon.vue"
|
||||
import LightIcon from "../components/LightIcon.vue"
|
||||
import {
|
||||
layer
|
||||
} from '@layui/layer-vue'
|
||||
import {
|
||||
useAppStore
|
||||
} from "../store/app";
|
||||
import {
|
||||
loginOut
|
||||
} from "../../src/api/api/user";
|
||||
import GlobalSetup from "./Global/GlobalSetup.vue";
|
||||
import GlobalContent from "./Global/GlobalContent.vue";
|
||||
import GlobalTab from "./Global/GlobalTab.vue";
|
||||
import GlobalMenu from "./Global/GlobalMenu.vue";
|
||||
import '@layui/layui-vue/es/checkbox/index.css';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlobalSetup,
|
||||
GlobalContent,
|
||||
GlobalTab,
|
||||
GlobalMenu,
|
||||
DarkIcon,
|
||||
LightIcon
|
||||
},
|
||||
setup() {
|
||||
|
||||
const appStore = useAppStore();
|
||||
const collapseState = ref(false);
|
||||
const visible = ref(false);
|
||||
const sideWidth = ref("230px");
|
||||
|
||||
const changeVisible = function() {
|
||||
visible.value = !visible.value;
|
||||
};
|
||||
|
||||
// 侧边状态
|
||||
const collapse = function() {
|
||||
collapseState.value = !collapseState.value;
|
||||
sideWidth.value = collapseState.value ? "60px" : "230px";
|
||||
};
|
||||
|
||||
// 路由刷新
|
||||
const refresh = function() {
|
||||
appStore.routerAlive = false;
|
||||
setTimeout(function() {
|
||||
appStore.routerAlive = true;
|
||||
}, 500);
|
||||
};
|
||||
const navBarOpacity = ref(0)
|
||||
const navBarWidth = ref(0)
|
||||
const navBarLeft = ref(0)
|
||||
const mouseenter = (e: MouseEvent) => {
|
||||
navBarOpacity.value = 1
|
||||
// @ts-ignore
|
||||
navBarWidth.value = e.target.offsetWidth
|
||||
// @ts-ignore
|
||||
navBarLeft.value = e.target.offsetLeft + e.target.parentNode.offsetLeft
|
||||
}
|
||||
// return instance
|
||||
return {
|
||||
sideWidth,
|
||||
changeVisible,
|
||||
collapseState,
|
||||
collapse,
|
||||
appStore,
|
||||
refresh,
|
||||
visible,
|
||||
mouseenter,
|
||||
navBarOpacity,
|
||||
navBarWidth,
|
||||
navBarLeft
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
_loginOutSure() {
|
||||
let $this = this;
|
||||
layer.confirm("您确定要注销吗?", {
|
||||
title: "提示",
|
||||
btn: [{
|
||||
text: '确定',
|
||||
callback: function(id) {
|
||||
layer.close(id);
|
||||
$this.__loginOutSure();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '取消',
|
||||
callback: function(id) {
|
||||
layer.close(id);
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
},
|
||||
async __loginOutSure() {
|
||||
let idx = layer.load(2);
|
||||
let result = await loginOut({});
|
||||
localStorage.removeItem('token');
|
||||
setTimeout((item) => {
|
||||
window.location.href = result;
|
||||
layer.close(idx);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-layout .layui-header .layui-form-switch {
|
||||
border: 1px solid rgba(60, 60, 60, 0.29);
|
||||
background-color: #f1f1f1 !important;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.layui-layout .layui-header .layui-form-switch svg {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="global-content">
|
||||
<router-view v-if="appStore.routerAlive"></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "GlobalContent"
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
useAppStore
|
||||
} from "../../store/app";
|
||||
const appStore = useAppStore();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.global-content {
|
||||
height: calc(100% - 42px);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<lay-menu v-model:selectedKey="selectKey" v-model:openKeys="openKeys" :collapse="collapse" :tree="isTree"
|
||||
:level="appStore.level" :inverted="appStore.inverted">
|
||||
<view v-for="(mItem,mIndex) in menuList">
|
||||
<lay-sub-menu v-if="mItem['FChild'].length>0" :id="mItem['FRemark']||mIndex">
|
||||
<template #icon>
|
||||
<lay-icon :type="mItem['FIcon']||'layui-icon-home'"></lay-icon>
|
||||
</template>
|
||||
<template #title> {{mItem['FName']}} </template>
|
||||
<view v-if="mItem['FChild'].length>0" v-for="(cItem,cIndex) in mItem['FChild']">
|
||||
<lay-menu-item :id="cItem['FRemark']">
|
||||
<template #icon>
|
||||
<lay-icon :type="cItem['FIcon']||'layui-icon-home'"></lay-icon>
|
||||
</template>
|
||||
<template #title> {{cItem['FName']}} </template>
|
||||
</lay-menu-item>
|
||||
</view>
|
||||
</lay-sub-menu>
|
||||
<lay-menu-item v-else :id="mItem['FRemark']||mIndex">
|
||||
<template #icon>
|
||||
<lay-icon :type="mItem['FIcon']||'layui-icon-home'"></lay-icon>
|
||||
</template>
|
||||
<template #title> {{mItem['FName']}} </template>
|
||||
</lay-menu-item>
|
||||
</view>
|
||||
</lay-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
getMenuList
|
||||
} from "../../api/api/user"
|
||||
export default {
|
||||
name: "GlobalMenu",
|
||||
data() {
|
||||
const menuList = ref([]);
|
||||
return {
|
||||
menuList
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getMenuList(null).then((data: Array < Object > ) => {
|
||||
this.menuList = data || [];
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
useRoute,
|
||||
useRouter
|
||||
} from "vue-router";
|
||||
import {
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
useAppStore
|
||||
} from "../../store/app";
|
||||
const appStore = useAppStore();
|
||||
interface MenuProps {
|
||||
collapse: boolean;
|
||||
}
|
||||
const props = withDefaults(defineProps < MenuProps > (), {
|
||||
collapse: false,
|
||||
});
|
||||
const route = useRoute();
|
||||
const routers = useRouter();
|
||||
const selectKey = ref(route.path);
|
||||
const openKeys = ref(["0"]);
|
||||
const isTree = ref(true);
|
||||
watch(route, (val) => {
|
||||
selectKey.value = route.path;
|
||||
});
|
||||
watch(selectKey, (val) => {
|
||||
routers.push(val);
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<lay-layer title="更多设置" type="drawer" area="360px" v-model="visible">
|
||||
<div class="global-setup">
|
||||
<!-- 颜色 -->
|
||||
<template v-for="(themeVariableName, index) in themeVariableNames" :key="index">
|
||||
<lay-color-picker v-model="appStore.themeVariable[themeVariableName]"></lay-color-picker>
|
||||
</template>
|
||||
<!-- 其他 -->
|
||||
<global-setup-item label="多选项卡">
|
||||
<lay-switch v-model="appStore.tab"></lay-switch>
|
||||
</global-setup-item>
|
||||
<global-setup-item label="菜单层级">
|
||||
<lay-switch v-model="appStore.level"></lay-switch>
|
||||
</global-setup-item>
|
||||
<global-setup-item label="菜单反选">
|
||||
<lay-switch v-model="appStore.inverted"></lay-switch>
|
||||
</global-setup-item>
|
||||
</div>
|
||||
</lay-layer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "GlobalSetup",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
useAppStore
|
||||
} from "../../store/app";
|
||||
import {
|
||||
ref,
|
||||
watch
|
||||
} from "vue";
|
||||
import globalSetupItem from "./GlobalSetupItem.vue";
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
const emits = defineEmits(["update:modelValue"]);
|
||||
|
||||
interface SetupProps {
|
||||
modelValue: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps < SetupProps > (), {
|
||||
modelValue: false,
|
||||
});
|
||||
|
||||
const visible = ref(props.modelValue);
|
||||
|
||||
watch(visible, (val) => {
|
||||
emits("update:modelValue", val);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
visible.value = val;
|
||||
}
|
||||
);
|
||||
|
||||
const themeVariableNames = [
|
||||
"--global-primary-color",
|
||||
"--global-normal-color",
|
||||
"--global-warm-color",
|
||||
"--global-danger-color",
|
||||
"--global-checked-color",
|
||||
];
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.global-setup {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.global-setup .layui-colorpicker {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="global-setup-item">
|
||||
<div class="global-setup-item-label">
|
||||
{{ label }}
|
||||
</div>
|
||||
<div class="global-setup-item-extra">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from "vue";
|
||||
export default {
|
||||
name: "GlobalSetupItem",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
interface SetupItemProps {
|
||||
label: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps < SetupItemProps > (), {
|
||||
label: "标题",
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.global-setup-item {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
.global-setup-item-label {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.global-setup-item-extra {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<lay-tab v-if="appStore.tab" :modelValue="route.path" :allowClose="allowClose" @change="change" @close="close">
|
||||
<template :key="tab" v-for="tab in tabs">
|
||||
<lay-tab-item :id="tab['id']" :title="tab['title']" :closable="tab['closable']"></lay-tab-item>
|
||||
</template>
|
||||
</lay-tab>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "GlobalTab"
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
ref,
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
useRoute,
|
||||
useRouter
|
||||
} from "vue-router";
|
||||
import {
|
||||
useAppStore
|
||||
} from "../../store/app";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const appStore = useAppStore();
|
||||
const allowClose = ref(true);
|
||||
let defaults = [];
|
||||
defaults.push({
|
||||
"title": "首页",
|
||||
"id": "/",
|
||||
"closable": false
|
||||
});
|
||||
if (route.path != "/" && route.path != "/index") {
|
||||
let find = {
|
||||
"title": "",
|
||||
"id": route.path,
|
||||
"closable": true
|
||||
};
|
||||
let title = "";
|
||||
router.options.routes.forEach((r1) => {
|
||||
if (find.id == r1.path) {
|
||||
find["title"] = (r1.children.length > 0 ? r1.children[0].meta["title"] : r1.meta[
|
||||
"title"]) as string;
|
||||
} else {
|
||||
r1.children.forEach((r2) => {
|
||||
if (find.id == r2.path) find["title"] = (r2.meta["title"]) as string;
|
||||
});
|
||||
}
|
||||
})
|
||||
if (find["title"] != "") defaults.push(find);
|
||||
}
|
||||
const tabs = ref(defaults);
|
||||
const change = function(id: string) {
|
||||
router.push(id);
|
||||
};
|
||||
|
||||
const close = function(path: string) {
|
||||
tabs.value = tabs.value.filter((ele) => ele['id'] != path);
|
||||
//当关闭的是最后一个的时候默认跳转倒数
|
||||
let chose = tabs.value.find(s => s['id'] == route['path']);
|
||||
if (chose == null && tabs.value.length > 0) {
|
||||
change(tabs.value[tabs.value.length - 1]['id'])
|
||||
}
|
||||
};
|
||||
|
||||
watch(route, function() {
|
||||
if (route.path != "/" && route.path != "/index") {
|
||||
let bool = false;
|
||||
tabs.value.forEach((tab) => {
|
||||
if (tab['id'] === route['path']) {
|
||||
bool = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!bool) {
|
||||
tabs.value.push({
|
||||
id: route.fullPath,
|
||||
title: route.meta.title
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -0,0 +1,10 @@
|
||||
import { createApp } from 'vue'
|
||||
import Router from './router'
|
||||
import Store from './store'
|
||||
import App from './App.vue'
|
||||
import './styles/index.css'
|
||||
|
||||
createApp(App)
|
||||
.use(Store)
|
||||
.use(Router)
|
||||
.mount('#app');
|
||||
@ -0,0 +1,117 @@
|
||||
import BaseLayout from '../../layouts/BaseLayout.vue';
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/',
|
||||
component: BaseLayout,
|
||||
meta: { title: '首页' },
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('../../views/Home/home.vue'),
|
||||
meta: { title: '首页', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('../../views/Home/home.vue'),
|
||||
meta: { title: '首页', icon: "" },
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/need',
|
||||
component: BaseLayout,
|
||||
meta: { title: '待办事项' },
|
||||
children: [
|
||||
{
|
||||
path: '/need/all',
|
||||
component: () => import('../../views/Need/all.vue'),
|
||||
meta: { title: '全部事项', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/need/unfinish',
|
||||
component: () => import('../../views/Need/unfinish.vue'),
|
||||
meta: { title: '未完事项', icon: "" },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/team',
|
||||
component: BaseLayout,
|
||||
meta: { title: '协同路线' },
|
||||
children: [
|
||||
{
|
||||
path: '/team/all',
|
||||
component: () => import('../../views/Team/all.vue'),
|
||||
meta: { title: '全部路线', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/team/launch',
|
||||
component: () => import('../../views/Team/launch.vue'),
|
||||
meta: { title: '我发起的', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/team/join',
|
||||
component: () => import('../../views/Team/join.vue'),
|
||||
meta: { title: '我参与的', icon: "" },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/order',
|
||||
component: BaseLayout,
|
||||
meta: { title: '清单管理' },
|
||||
children: [
|
||||
{
|
||||
path: '/order/material',
|
||||
component: () => import('../../views/Order/material.vue'),
|
||||
meta: { title: '物料清单', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/order/formula',
|
||||
component: () => import('../../views/Order/formula.vue'),
|
||||
meta: { title: '配方清单', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/order/package',
|
||||
component: () => import('../../views/Order/package.vue'),
|
||||
meta: { title: '包材清单', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/order/type',
|
||||
component: () => import('../../views/Order/type.vue'),
|
||||
meta: { title: '分类清单', icon: "" },
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system',
|
||||
component: BaseLayout,
|
||||
meta: { title: '系统设置' },
|
||||
children: [
|
||||
{
|
||||
path: '/system/user',
|
||||
component: () => import('../../views/System/user.vue'),
|
||||
meta: { title: '用户管理', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/system/factory',
|
||||
component: () => import('../../views/System/factory.vue'),
|
||||
meta: { title: '模式管理', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/system/role',
|
||||
component: () => import('../../views/System/role.vue'),
|
||||
meta: { title: '角色管理', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/system/config',
|
||||
component: () => import('../../views/System/config.vue'),
|
||||
meta: { title: '系统配置', icon: "" },
|
||||
},
|
||||
{
|
||||
path: '/system/log',
|
||||
component: () => import('../../views/System/log.vue'),
|
||||
meta: { title: '日志管理', icon: "" },
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,5 @@
|
||||
declare module '*.vue' {
|
||||
import { DefineComponent } from 'vue'
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useAppStore = defineStore({
|
||||
id: 'app',
|
||||
state: () => {
|
||||
return {
|
||||
tab: true,
|
||||
level: true,
|
||||
inverted: true,
|
||||
routerAlive: true,
|
||||
theme: 'light',
|
||||
themeVariable: {
|
||||
"--global-checked-color": "#5fb878",
|
||||
"--global-primary-color": "#009688",
|
||||
"--global-normal-color": "#1e9fff",
|
||||
"--global-danger-color": "#ff5722",
|
||||
"--global-warm-color": "#ffb800",
|
||||
} as any,
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [
|
||||
{
|
||||
key: 'tab',
|
||||
storage: localStorage
|
||||
}, {
|
||||
key: 'theme',
|
||||
storage: localStorage
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,7 @@
|
||||
import { createPinia } from 'pinia'
|
||||
import piniaPluginPersist from 'pinia-plugin-persist'
|
||||
|
||||
const store = createPinia();
|
||||
store.use(piniaPluginPersist);
|
||||
|
||||
export default store;
|
||||
@ -0,0 +1,24 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
|
||||
export const useAppStore = defineStore({
|
||||
id: 'user',
|
||||
state: () => {
|
||||
return {
|
||||
token: {},
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
enabled: true,
|
||||
strategies: [
|
||||
{
|
||||
key: 'token',
|
||||
storage: localStorage
|
||||
}, {
|
||||
key: 'userInfo',
|
||||
storage: localStorage
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,123 @@
|
||||
.lay-config-provider {
|
||||
height: 100%;
|
||||
}
|
||||
.layui-logo {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.layui-logo img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.layui-body {
|
||||
overflow-x: hidden;
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
.layui-body > .layui-tab {
|
||||
margin: 0px;
|
||||
}
|
||||
.layui-body > .layui-tab > .layui-tab-content {
|
||||
padding: 0px;
|
||||
}
|
||||
.layui-body > .layui-tab > .layui-tab-head {
|
||||
width: 100%;
|
||||
}
|
||||
.layui-body > .layui-tab > .layui-tab-head > .layui-tab-title {
|
||||
border: 1px solid whitesmoke;
|
||||
background-color: white;
|
||||
border-left: none;
|
||||
}
|
||||
.layui-body > .layui-tab > .layui-tab-head > .layui-tab-title > li {
|
||||
color: dimgray;
|
||||
font-size: 13.5px;
|
||||
line-height: 40px;
|
||||
border-right: 1px solid whitesmoke;
|
||||
padding-right: 9px;
|
||||
}
|
||||
.layui-body > .layui-tab > .layui-tab-head > .layui-tab-title > li.layui-this::after {
|
||||
border: none;
|
||||
}
|
||||
.layui-header {
|
||||
background: white;
|
||||
}
|
||||
.layui-header .layui-nav {
|
||||
background: transparent;
|
||||
}
|
||||
.layui-header .layui-nav.layui-layout-left {
|
||||
left: 0 !important ;
|
||||
position: relative !important;
|
||||
}
|
||||
.layui-header .layui-nav.layui-layout-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 60px;
|
||||
}
|
||||
.layui-header .layui-nav.layui-layout-right > li{
|
||||
height: 60px;
|
||||
}
|
||||
.layui-header .layui-nav{
|
||||
padding: 0;
|
||||
}
|
||||
.layui-header .layui-nav * {
|
||||
color: #393d49;
|
||||
}
|
||||
.layui-header .layui-nav .layui-nav-item > a {
|
||||
padding: 0px 24px;
|
||||
height: 60px;
|
||||
}
|
||||
.layui-side {
|
||||
z-index: 9999;
|
||||
width: 230px !important;
|
||||
background: rgb(34, 36, 37, 98%);
|
||||
box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
|
||||
}
|
||||
.layui-side .layui-nav {
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.layui-layout.collapse .layui-logo {
|
||||
width: 60px;
|
||||
}
|
||||
.layui-layout.collapse .layui-side {
|
||||
width: 60px !important;
|
||||
}
|
||||
.layui-layout.collapse .layui-body {
|
||||
left: 60px;
|
||||
}
|
||||
.layui-layout.collapse .layui-header .layui-layout-left {
|
||||
left: 60px;
|
||||
}
|
||||
.layui-layout .layui-logo,
|
||||
.layui-layout .layui-side,
|
||||
.layui-layout .layui-body,
|
||||
.layui-layout .layui-header .layui-layout-left {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.layui-layout {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sItem{
|
||||
display: flex;
|
||||
}
|
||||
.sItem .layui-col{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.sItem .form-select{
|
||||
padding:10px;
|
||||
border: 1px solid #f1f2f1;
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.sItem .layui-icon{
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.sItem .layui-col-md7{
|
||||
margin-right: 15px;
|
||||
}
|
||||
.layui-table-main td{
|
||||
white-space: pre-line!important;
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
@import url(./admin.css);
|
||||
@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<lay-layout class="home-layout">
|
||||
<lay-header>
|
||||
<lay-container fluid="true" style="padding: 10px"></lay-container>
|
||||
<div class="height20"></div>
|
||||
<lay-row space="10">
|
||||
<lay-col md="6">
|
||||
<div class="home-box1">
|
||||
<p class="icon">
|
||||
<lay-icon type="layui-icon-note" size="26px"></lay-icon>
|
||||
</p>
|
||||
<p class="desc">
|
||||
<label class="count">{{ topCount[0] }}</label>
|
||||
<label>未完代办事项</label>
|
||||
</p>
|
||||
</div>
|
||||
</lay-col>
|
||||
<lay-col md="6">
|
||||
<div class="home-box1">
|
||||
<p class="icon c1">
|
||||
<lay-icon type="layui-icon-form" size="26px"></lay-icon>
|
||||
</p>
|
||||
<p class="desc">
|
||||
<label class="count">{{ topCount[1] }}</label>
|
||||
<label>今日新增待办</label>
|
||||
</p>
|
||||
</div>
|
||||
</lay-col>
|
||||
<lay-col md="6">
|
||||
<div class="home-box1">
|
||||
<p class="icon c2">
|
||||
<lay-icon type="layui-icon-slider" size="26px"></lay-icon>
|
||||
</p>
|
||||
<p class="desc">
|
||||
<label class="count">{{ topCount[2] }}</label>
|
||||
<label>协同路线</label>
|
||||
</p>
|
||||
</div>
|
||||
</lay-col>
|
||||
<lay-col md="6">
|
||||
<div class="home-box1">
|
||||
<p class="icon c3">
|
||||
<lay-icon type="layui-icon-download-circle" size="26px"></lay-icon>
|
||||
</p>
|
||||
<p class="desc">
|
||||
<label class="count">{{ topCount[3] }}</label>
|
||||
<label>我参与的路线</label>
|
||||
</p>
|
||||
</div>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-header>
|
||||
<lay-header class="layui-header2">
|
||||
<div class="height10"></div>
|
||||
<div class="lay-row2">
|
||||
<lay-row space="10">
|
||||
<lay-col md="24">
|
||||
<h1>快捷入口</h1>
|
||||
</lay-col>
|
||||
<lay-col md="3" v-for="(item,index) in fastList" :key="index" @click="_goToMore(index)">
|
||||
<div :class="'home-box2 c'+index" :title="item.FName">{{item.FName}}</div>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</div>
|
||||
</lay-header>
|
||||
<lay-body>
|
||||
<div class="lay-row3">
|
||||
<div class="lay-row3-div" ref="lay-row3-div">
|
||||
<div class="home-box3">
|
||||
<h2 @click="_goToMore(-1)">点击查看更多待办事项</h2>
|
||||
<h1>最新待办事项</h1>
|
||||
</div>
|
||||
<lay-table v-if="tableHeight!=''" :height="tableHeight" :columns="dataColumn"
|
||||
:dataSource="dataList"></lay-table>
|
||||
</div>
|
||||
</div>
|
||||
</lay-body>
|
||||
</lay-layout>
|
||||
</template>
|
||||
<style>
|
||||
.height20 {
|
||||
height: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.height10 {
|
||||
height: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.height30 {
|
||||
height: 30px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.home-layout .layui-header {
|
||||
text-align: center;
|
||||
min-height: 148px;
|
||||
height: auto;
|
||||
background-color: unset;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.home-layout .layui-header2 {
|
||||
min-height: 194px;
|
||||
}
|
||||
|
||||
.home-layout .layui-body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 10px auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.home-box1 {
|
||||
width: 70%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
height: 100px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box1 p {
|
||||
display: inline-block;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-radius: 4px 0 0 4px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.home-box1 .icon {
|
||||
width: 40%;
|
||||
background: #FD4D4F;
|
||||
}
|
||||
|
||||
.home-box1 .icon.c1 {
|
||||
background: #32BDB6;
|
||||
}
|
||||
|
||||
.home-box1 .icon.c2 {
|
||||
background: #AAEB0E;
|
||||
}
|
||||
|
||||
.home-box1 .icon.c3 {
|
||||
background: #597CF4;
|
||||
}
|
||||
|
||||
.home-box1 .desc {
|
||||
width: calc(60% - 2px);
|
||||
background: #FFF;
|
||||
color: #444;
|
||||
padding: 20px 0;
|
||||
height: 58px;
|
||||
color: #595959;
|
||||
border: 1px solid rgba(187, 187, 187, 100);
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.home-box1 .desc label {
|
||||
display: block;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.home-box1 .desc .count {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.lay-row2 {
|
||||
background: #fff;
|
||||
width: 95%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.lay-row2 h1 {
|
||||
color: #101010;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.home-box2 {
|
||||
height: 94px;
|
||||
width: 110px;
|
||||
display: block;
|
||||
background: #000;
|
||||
line-height: 94px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 10px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.home-box2.c0 {
|
||||
background: #36cfca;
|
||||
}
|
||||
|
||||
.home-box2.c1 {
|
||||
background: #597cf4;
|
||||
}
|
||||
|
||||
.home-box2.c2 {
|
||||
background: #e99d42;
|
||||
}
|
||||
|
||||
.home-box2.c3 {
|
||||
background: #36cf3c;
|
||||
}
|
||||
|
||||
.home-box2.c4 {
|
||||
background: #F4595c;
|
||||
}
|
||||
|
||||
.home-box2.c5 {
|
||||
background: #31BDEC;
|
||||
}
|
||||
|
||||
.home-box2.c6 {
|
||||
background: #FF5722;
|
||||
}
|
||||
|
||||
.home-box2.c7 {
|
||||
background: #AAEB0E;
|
||||
}
|
||||
|
||||
.lay-row3 {
|
||||
background: #fff;
|
||||
width: 95%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px 20px;
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
|
||||
.lay-row3-div {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20px;
|
||||
clear: both;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.lay-row3 .home-box3 {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.lay-row3 .home-box3 h1 {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.lay-row3 .home-box3 h2 {
|
||||
font-weight: 400;
|
||||
color: #168ADD;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
margin-right: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import {
|
||||
ref
|
||||
} from "vue";
|
||||
import {
|
||||
getHomeTopCount,
|
||||
getMenuList
|
||||
} from "/src/api/api/user";
|
||||
import {
|
||||
getPageList
|
||||
} from "/src/api/api/common";
|
||||
import {
|
||||
useRouter
|
||||
} from "vue-router";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
let dataColumn = [{
|
||||
title: "销售号",
|
||||
key: "FSaleCode",
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "发起时间",
|
||||
key: "FAddDate",
|
||||
align: "center",
|
||||
width: "182px"
|
||||
},
|
||||
{
|
||||
title: "当前流程",
|
||||
key: "FName",
|
||||
align: "center",
|
||||
width: "200px"
|
||||
},
|
||||
{
|
||||
title: "事项状态",
|
||||
key: "FState",
|
||||
align: "center",
|
||||
width: "98px"
|
||||
},
|
||||
{
|
||||
title: "任务来源",
|
||||
key: "FDesc",
|
||||
align: "center"
|
||||
}
|
||||
];
|
||||
const dataList = ref([]);
|
||||
const topCount = ref([" ", " ", " ", " "]);
|
||||
const tableHeight = ref("");
|
||||
const routerInfo = useRouter();
|
||||
const fastList = ref([]);
|
||||
return {
|
||||
topCount,
|
||||
dataColumn,
|
||||
dataList,
|
||||
tableHeight,
|
||||
routerInfo,
|
||||
fastList
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this._getHomeTopCount();
|
||||
let height = parseInt(this.$refs["lay-row3-div"].offsetHeight) - 100;
|
||||
this.tableHeight = height + "px";
|
||||
this._getHomeFast();
|
||||
this._getHomeNeed(height / 40);
|
||||
},
|
||||
methods: {
|
||||
async _getHomeTopCount() {
|
||||
this.topCount = await getHomeTopCount() || [0, 0, 0, 0];
|
||||
},
|
||||
async _getHomeFast() {
|
||||
let result = await getMenuList({});
|
||||
let fastList = [];
|
||||
result.forEach((first) => {
|
||||
first.FChild.forEach((second) => {
|
||||
if (second.FName.indexOf("全部") == -1 && second.FName.indexOf("管理") == -1) {
|
||||
if (fastList.length < 8) fastList.push(second);
|
||||
}
|
||||
});
|
||||
});
|
||||
this.fastList = fastList;
|
||||
},
|
||||
async _getHomeNeed(count) {
|
||||
let postData = {
|
||||
FPageIndex: 1,
|
||||
FPageSize: Math.floor(count)
|
||||
}
|
||||
postData.FPageSize = postData.FPageSize < 5 ? 5 : postData.FPageSize;
|
||||
let result = await getPageList(postData, "Task");
|
||||
result.Data.List = result.Data.List || [];
|
||||
result.Data.List.forEach((item) => {
|
||||
item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate);
|
||||
item.FState = item.FState == 2 ? "已完成" : "进行中";
|
||||
});
|
||||
this.dataList = result.Data.List || []
|
||||
},
|
||||
//日期处理
|
||||
dateFormat(dataStr) {
|
||||
return dataStr.replace('T', ' ').split('.')[0];
|
||||
},
|
||||
//更多待办事项
|
||||
_goToMore(index) {
|
||||
let path = "";
|
||||
if (index == -1) path = '/need/all';
|
||||
else path = this.fastList[index].FRemark;
|
||||
this.routerInfo.push(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<lay-container fluid="true"
|
||||
:style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')">
|
||||
<lay-row space="10">
|
||||
<lay-col span="24">
|
||||
<lay-card>
|
||||
<lay-form :model="searchObj" class="search-box">
|
||||
<lay-row class="search-items">
|
||||
<lay-form-item label="销售号" prop="FSaleCode">
|
||||
<lay-input v-model="searchObj.FSaleCode"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="当前流程" prop="FType">
|
||||
<lay-select v-model="searchObj.FType">
|
||||
<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue"
|
||||
:label="tIdv.FName"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState">
|
||||
<lay-select v-model="searchObj.FState">
|
||||
<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id"
|
||||
:label="tv.name"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="发起日期" prop="FDateRange">
|
||||
<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date">
|
||||
</lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-row>
|
||||
<lay-form-item class="search-btn">
|
||||
<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button>
|
||||
<lay-button size="sm" @click="_clickReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList"
|
||||
v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar"
|
||||
:page="dataList.length>0?pageInfo:null" @change="changePage">
|
||||
<template v-slot:toolbar>
|
||||
<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button>
|
||||
</template>
|
||||
<template v-slot:FStateName="{ data }">
|
||||
<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span>
|
||||
<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span>
|
||||
</template>
|
||||
<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }">
|
||||
<lay-button size="xs" type="primary" @click="_clickSetInfo(data,1)">操作</lay-button>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
<lay-layer :area="modelArea[1]" v-model="showEditBox[1]" :title="objInfoObj.FName">
|
||||
<AddTerm v-if="showEditBox[1]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></AddTerm>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" :title="objInfoObj.FName">
|
||||
<BOMDownload v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></BOMDownload>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" :title="objInfoObj.FName">
|
||||
<EditView v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditView>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[4]" v-model="showEditBox[4]" :title="objInfoObj.FName">
|
||||
<AddPackage v-if="showEditBox[4]" :data-info-obj="objInfoObj" @cancelClick="cancelClick"></AddPackage>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[5]" v-model="showEditBox[5]" :title="objInfoObj.FName">
|
||||
<EditGroup v-if="showEditBox[5]" :data-info-obj="objInfoObj" @cancelClick="cancelClick"></EditGroup>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[6]" v-model="showEditBox[6]" :title="objInfoObj.FName">
|
||||
<SureView v-if="showEditBox[6]" :data-info-obj="objInfoObj" @cancelClick="cancelClick"></SureView>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[7]" v-model="showEditBox[7]" :title="objInfoObj.FName">
|
||||
<SureTeam v-if="showEditBox[7]" :data-info-obj="objInfoObj" :objInfoObj="objInfoObj" @cancelClick="cancelClick"></SureTeam>
|
||||
</lay-layer>
|
||||
<lay-layer :area="modelArea[8]" v-model="showEditBox[8]" :title="objInfoObj.FName">
|
||||
<SupplyPackage v-if="showEditBox[8]" :data-info-obj="objInfoObj" @cancelClick="cancelClick"></SupplyPackage>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
ref,
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
getBasicList,
|
||||
getPageList
|
||||
} from "/src/api/api/common";
|
||||
import AddTerm from '../Team/components/AddTerm.vue';
|
||||
import BOMDownload from "./components/BOMDownload.vue";
|
||||
import EditView from "./components/EditView.vue";
|
||||
import AddPackage from "./components/AddPackage.vue";
|
||||
import SureView from "./components/SureView.vue";
|
||||
import EditGroup from "./components/EditGroup.vue";
|
||||
import SureTeam from "./components/SureTeam.vue";
|
||||
import SupplyPackage from "./components/SupplyPackage.vue";
|
||||
import '@layui/layui-vue/es/checkbox/index.css';
|
||||
import '@layui/layui-vue/es/radio/index.css';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AddTerm,
|
||||
BOMDownload,
|
||||
EditView,
|
||||
AddPackage,
|
||||
SureView,
|
||||
EditGroup,
|
||||
SureTeam,
|
||||
SupplyPackage
|
||||
},
|
||||
setup() {
|
||||
let dataColumn = [{
|
||||
title: "销售号",
|
||||
key: "FSaleCode",
|
||||
width: "300px",
|
||||
align: 'center',
|
||||
hide: false
|
||||
},
|
||||
{
|
||||
title: "MDM编码",
|
||||
key: "FMdmCode",
|
||||
width: "160px",
|
||||
align: 'center',
|
||||
hide: false
|
||||
},
|
||||
{
|
||||
title: "试验号",
|
||||
key: "FTestCode",
|
||||
width: "160px",
|
||||
align: 'center',
|
||||
hide: false
|
||||
},
|
||||
{
|
||||
title: "任务来源",
|
||||
key: "FDesc",
|
||||
width: "400px",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "当前流程",
|
||||
key: "FName",
|
||||
width: "180px",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "发起时间",
|
||||
key: "FAddDate",
|
||||
width: "178px",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "事项状态",
|
||||
key: "FStateName",
|
||||
width: "98px",
|
||||
align: 'center',
|
||||
customSlot: 'FStateName',
|
||||
},
|
||||
{
|
||||
title: "负责人",
|
||||
key: "FUserName",
|
||||
width: "160px",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
key: "FFinishDate",
|
||||
width: "178px",
|
||||
align: 'center',
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "operator",
|
||||
width: "100px",
|
||||
fixed: "right",
|
||||
customSlot: 'operator',
|
||||
align: 'center'
|
||||
}
|
||||
];
|
||||
const selectedKeys = ref(["1"]);
|
||||
const checkbox = ref(false);
|
||||
const defaultToolbar = ref(true);
|
||||
const pageInfo = ref({
|
||||
total: 0,
|
||||
limit: 10,
|
||||
current: 1
|
||||
});
|
||||
const dataList = ref([]);
|
||||
const typeList = ref([]);
|
||||
const searchObj = ref({});
|
||||
const postData = ref({});
|
||||
|
||||
const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false]);
|
||||
const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%"]);
|
||||
const objInfoObj = ref({});
|
||||
const editType = ref(1);
|
||||
const stateList = ref([{
|
||||
id: 1,
|
||||
name: "进行中"
|
||||
}, {
|
||||
id: 2,
|
||||
name: "已完成"
|
||||
}]);
|
||||
const hasLoaded = ref(false);
|
||||
|
||||
return {
|
||||
selectedKeys,
|
||||
checkbox,
|
||||
defaultToolbar,
|
||||
dataColumn,
|
||||
dataList,
|
||||
pageInfo,
|
||||
searchObj,
|
||||
postData,
|
||||
typeList,
|
||||
showEditBox,
|
||||
modelArea,
|
||||
objInfoObj,
|
||||
editType,
|
||||
stateList,
|
||||
hasLoaded
|
||||
};
|
||||
},
|
||||
props: {
|
||||
dataInfoObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
pageTypeObj: {
|
||||
type: Number,
|
||||
default: () => 1,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.dataInfoObj) {
|
||||
this.dataColumn.pop();
|
||||
this.dataColumn[0].hide = true;
|
||||
this.dataColumn[1].hide = true;
|
||||
this.dataColumn[2].hide = true;
|
||||
this.dataColumn[7].hide = false;
|
||||
}
|
||||
this._getTypeList();
|
||||
this._getPageList(true);
|
||||
},
|
||||
methods: {
|
||||
changePage(obj) {
|
||||
this.pageInfo.current = obj.current;
|
||||
this.pageInfo.limit = obj.limit;
|
||||
this._getPageList();
|
||||
},
|
||||
cancelClick(isRefresh, onlyRefresh) {
|
||||
if (isRefresh) {
|
||||
this._getPageList(true);
|
||||
}
|
||||
if (onlyRefresh) return false;
|
||||
for (let i = 0; i < this.showEditBox.length; i++) {
|
||||
this.showEditBox[i] = false;
|
||||
}
|
||||
},
|
||||
async _getTypeList() {
|
||||
this.typeList = await getBasicList(33) || [];
|
||||
},
|
||||
//分页列表
|
||||
async _getPageList(isFirst, showOk) {
|
||||
//this.dataList = [];
|
||||
this.pageInfo.total = 0;
|
||||
if (isFirst) {
|
||||
this.pageInfo.current = 1;
|
||||
this.pageInfo.total = 0;
|
||||
}
|
||||
if (this.dataInfoObj && this.dataInfoObj.FID) {
|
||||
this.postData.FTeamID = this.dataInfoObj.FID;
|
||||
this.postData.FIsUser = false;
|
||||
}
|
||||
if (this.pageTypeObj && this.pageTypeObj == 2) {
|
||||
this.postData.FState = 99;
|
||||
}
|
||||
this.postData.FPageIndex = this.pageInfo.current;
|
||||
this.postData.FPageSize = this.pageInfo.limit;
|
||||
let result = await getPageList(this.postData, "Task");
|
||||
result.Data.List = result.Data.List || [];
|
||||
result.Data.List.forEach((item) => {
|
||||
let type = this.typeList.find(s => s.FValue === item.FType);
|
||||
item.FTypeName = type == null ? "" : type.FName;
|
||||
let state = this.stateList.find(s => s.id === item.FState)
|
||||
item.FStateName = state == null ? "" : state.name;
|
||||
item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate);
|
||||
item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate);
|
||||
item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate);
|
||||
});
|
||||
this.pageInfo.total = result.Data.Total || 0;
|
||||
this.dataList = result.Data.List;
|
||||
this.hasLoaded = true;
|
||||
},
|
||||
//日期处理
|
||||
dateFormat(dataStr) {
|
||||
return dataStr.replace('T', ' ').split('.')[0];
|
||||
},
|
||||
_clickSetInfo(data, type) {
|
||||
for (let i = 0; i < this.showEditBox.length; i++) {
|
||||
this.showEditBox[i] = false;
|
||||
}
|
||||
if (data.FType == 1) {
|
||||
data.FBoxType = 1; //配方选择
|
||||
} else if (data.FType == 2) {
|
||||
data.FBoxType = 2; //BOM下载
|
||||
} else if (data.FType == 9 || data.FType == 10) {
|
||||
data.FBoxType = 4; //新包材新增、新子项包材申请
|
||||
} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) {
|
||||
data.FBoxType = 3; //视图编辑
|
||||
} else if (data.FType == 8) {
|
||||
data.FBoxType = 5; //组编号申请
|
||||
} else if (data.FType == 12) {
|
||||
data.FBoxType = 6; //成品视图物料组复核
|
||||
} else if (data.FType == 13) {
|
||||
data.FBoxType = 7; //流程确认完成
|
||||
} else if (data.FType == 14) {
|
||||
data.FBoxType = 8; //补充包材规格
|
||||
} else {
|
||||
return layer.msg("未知事项类型");
|
||||
}
|
||||
this.objInfoObj = data;
|
||||
this.editType = type;
|
||||
this.showEditBox[data.FBoxType] = true;
|
||||
},
|
||||
//检索-检索
|
||||
_clickSearch() {
|
||||
this.postData = {};
|
||||
for (let key in this.searchObj) {
|
||||
let val = this.searchObj[key];
|
||||
if (val != null && val !== "") this.postData[key] = val;
|
||||
}
|
||||
this._getPageList(true);
|
||||
},
|
||||
//检索-重置
|
||||
_clickReset() {
|
||||
this.searchObj = {};
|
||||
this._clickSearch();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="content-box">
|
||||
<lay-table v-if="dataList.length>0" height="300px" :columns="dataColumn" :data-source="dataList"
|
||||
:row-style="rowStyle">
|
||||
<template v-slot:toolbar v-if="dataObj&&dataObj.FState!=2">
|
||||
<lay-button size="sm" @click="_getGroup" type="danger">获取组编号</lay-button>
|
||||
</template>
|
||||
</lay-table>
|
||||
<OperateLog v-if="dataInfoObj.FTeamID" ref="OperateLog" :dataInfoObj="dataInfoObj"></OperateLog>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.content-box {
|
||||
margin: 30px 10px;
|
||||
display: block;
|
||||
position: relative;
|
||||
clear: both;
|
||||
float: none;
|
||||
height: 664px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import {
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
getTeamworkView
|
||||
} from "/src/api/api/teamwork";
|
||||
import {
|
||||
dockMaterialGroup
|
||||
} from "/src/api/api/task";
|
||||
import OperateLog from "./OperateLog.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
OperateLog
|
||||
},
|
||||
setup() {
|
||||
const dataColumn = ref([]);
|
||||
const dataList = ref([]);
|
||||
const dataObj = ref({});
|
||||
const dataColor = ref([]);
|
||||
let colors = ["1E9FFF", "009688", "393D49", "5FB878"];
|
||||
const rowStyle = function(row, rowIndex) {
|
||||
let color = "";
|
||||
for (let idx = 0; idx < dataColor.value.length; idx++) {
|
||||
if (rowIndex > dataColor.value[idx]) color = "color:#" + colors[idx];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
return {
|
||||
dataColumn,
|
||||
dataList,
|
||||
dataColor,
|
||||
rowStyle,
|
||||
dataObj
|
||||
}
|
||||
},
|
||||
props: {
|
||||
dataInfoObj: {
|
||||
type: Object,
|
||||
default: () => [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.dataObj = JSON.parse(JSON.stringify(this.dataInfoObj));
|
||||
console.log(this.dataObj)
|
||||
this.getViewList();
|
||||
},
|
||||
methods: {
|
||||
async getViewList() {
|
||||
let postData = {
|
||||
FTeamID: this.dataObj.FTeamID,
|
||||
FViewType: 4,
|
||||
FType: "1"
|
||||
};
|
||||
if (this.dataObj.FState == 2) postData.FFinish = 1;
|
||||
let idx = layer.load(2);
|
||||
let result = await getTeamworkView(postData);
|
||||
let tempList = [];
|
||||
for (let key in result) {
|
||||
if (tempList.length == 0) tempList.push(result[key]);
|
||||
};
|
||||
let dataColumn = [];
|
||||
let dataList = [];
|
||||
let dataColor = []
|
||||
tempList.forEach((item) => {
|
||||
if (item.length > 0) {
|
||||
if (dataColumn.length == 0) {
|
||||
for (let key in item[0]) {
|
||||
let width = (key.indexOf("描述") != -1 || key == "文本" || key == "物料") ? "280px" :
|
||||
"130px";
|
||||
width = key.indexOf("编码") != -1 ? "200px" : width;
|
||||
dataColumn.push({
|
||||
key: key,
|
||||
title: key.split('.').pop(),
|
||||
align: "center",
|
||||
width: width
|
||||
});
|
||||
}
|
||||
}
|
||||
item.forEach((item2) => {
|
||||
dataList.push(item2);
|
||||
});
|
||||
dataColor.push(dataList.length - 1);
|
||||
}
|
||||
});
|
||||
this.dataColumn = dataColumn;
|
||||
this.dataList = dataList;
|
||||
this.dataColor = dataColor;
|
||||
layer.close(idx);
|
||||
},
|
||||
async _getGroup() {
|
||||
let idx = layer.load(2);
|
||||
try {
|
||||
let result = await dockMaterialGroup({
|
||||
FTeamID: this.dataObj.FTeamID
|
||||
});
|
||||
if (result > 0) {
|
||||
layer.msg('获取组编号成功');
|
||||
this.getViewList();
|
||||
this.dataObj.FState = 2;
|
||||
} else {
|
||||
layer.msg('获取组编号失败');
|
||||
}
|
||||
} catch (e) {}
|
||||
layer.close(idx);
|
||||
this.$refs.OperateLog._getPageList();
|
||||
},
|
||||
cancelClick(isRefresh) {
|
||||
isRefresh = isRefresh == undefined ? false : isRefresh;
|
||||
this.$emit('cancelClick', isRefresh);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<lay-container fluid="true" style="padding:10px;">
|
||||
<lay-row space="10">
|
||||
<lay-col span="24">
|
||||
<lay-card>
|
||||
<lay-form :model="searchObj" class="search-box">
|
||||
<lay-row class="search-items">
|
||||
<lay-form-item label="物料号" prop="FCode">
|
||||
<lay-input v-model="searchObj.FCode"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="试验号" prop="FTestCode">
|
||||
<lay-input v-model="searchObj.FTestCode"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="物料描述" prop="FName">
|
||||
<lay-input v-model="searchObj.FName"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-row>
|
||||
<lay-form-item class="search-btn">
|
||||
<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button>
|
||||
<lay-button size="sm" @click="_clickReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
<lay-table :columns="dataColumn" id="id" :dataSource="dataList"
|
||||
:page="dataList.length>0?pageInfo:null" @change="changePage">
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-button v-if="dataInfoObj.FName==data.FName" size="xs" type="danger"
|
||||
@click="_choseData(data)">已选</lay-button>
|
||||
<lay-button v-else size="xs" type="normal" @click="_choseData(data)">选择</lay-button>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
ref,
|
||||
watch
|
||||
} from "vue";
|
||||
import {
|
||||
getPageList
|
||||
} from "/src/api/api/common";
|
||||
import '@layui/layui-vue/es/checkbox/index.css';
|
||||
import '@layui/layui-vue/es/radio/index.css';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
let dataColumn = [{
|
||||
title: "物料号",
|
||||
key: "FCode",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "试验号",
|
||||
key: "FTestCode",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "物料描述",
|
||||
key: "FName",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "operator",
|
||||
width: "100px",
|
||||
customSlot: 'operator',
|
||||
align: 'center'
|
||||
}
|
||||
];
|
||||
const pageInfo = ref({
|
||||
total: 0,
|
||||
limit: 10,
|
||||
current: 1
|
||||
});
|
||||
const dataList = ref([]);
|
||||
const searchObj = ref({});
|
||||
const postData = ref({});
|
||||
const objInfoObj = ref({});
|
||||
|
||||
return {
|
||||
dataColumn,
|
||||
dataList,
|
||||
pageInfo,
|
||||
searchObj,
|
||||
postData,
|
||||
objInfoObj,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
dataInfoObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this._getPageList(true);
|
||||
},
|
||||
methods: {
|
||||
changePage(obj) {
|
||||
this.pageInfo.current = obj.current;
|
||||
this._getPageList();
|
||||
},
|
||||
//分页列表
|
||||
async _getPageList(isFirst, showOk) {
|
||||
this.pageInfo.total = 0;
|
||||
if (isFirst) {
|
||||
this.pageInfo.current = 1;
|
||||
this.pageInfo.total = 0;
|
||||
}
|
||||
this.postData.FPageIndex = this.pageInfo.current;
|
||||
this.postData.FPageSize = this.pageInfo.limit;
|
||||
this.postData.FType = 40;
|
||||
let result = await getPageList(this.postData, "Material");
|
||||
result.Data.List = result.Data.List || [];
|
||||
this.pageInfo.total = result.Data.Total || 0;
|
||||
this.dataList = result.Data.List;
|
||||
},
|
||||
//日期处理
|
||||
dateFormat(dataStr) {
|
||||
return dataStr.replace('T', ' ').split('.')[0];
|
||||
},
|
||||
_choseData(data) {
|
||||
let $this = this;
|
||||
layer.confirm("您确定要选择此子项吗?", {
|
||||
title: "提示",
|
||||
btn: [{
|
||||
text: '确定',
|
||||
callback: function(id) {
|
||||
layer.close(id);
|
||||
$this.$emit('selectClick', data)
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '取消',
|
||||
callback: function(id) {
|
||||
layer.close(id);
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
},
|
||||
//检索-检索
|
||||
_clickSearch() {
|
||||
this.postData = {};
|
||||
for (let key in this.searchObj) {
|
||||
let val = this.searchObj[key];
|
||||
if (val != null && val !== "") this.postData[key] = val;
|
||||
}
|
||||
this._getPageList(true);
|
||||
},
|
||||
//检索-重置
|
||||
_clickReset() {
|
||||
this.searchObj = {};
|
||||
this._clickSearch();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<lay-table class="empty-small2 empty-small3" style="margin:30px 0;" height="200px" :columns="dataColumn" id="FID"
|
||||
:dataSource="dataList">
|
||||
<template v-slot:toolbar>
|
||||
<p style="float:right;">操作日志</p>
|
||||
<lay-button size="sm" @click="_getPageList()">刷新</lay-button>
|
||||
</template>
|
||||
</lay-table>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
getPageList
|
||||
} from "/src/api/api/common";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
let dataColumn = [{
|
||||
title: "序号",
|
||||
key: "RowIndex",
|
||||
width: "80px"
|
||||
},
|
||||
{
|
||||
title: "操作时间",
|
||||
key: "FAddDate",
|
||||
width: "200px"
|
||||
},
|
||||
{
|
||||
title: "操作人",
|
||||
key: "FOptUser",
|
||||
width: "180px",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "说明",
|
||||
key: "FDesc"
|
||||
}
|
||||
];
|
||||
dataColumn.forEach((item) => {
|
||||
item.align = "center";
|
||||
});
|
||||
const dataList = ref([]);
|
||||
return {
|
||||
dataColumn,
|
||||
dataList
|
||||
}
|
||||
},
|
||||
props: {
|
||||
dataInfoObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout((item) => {
|
||||
this._getPageList();
|
||||
}, 100);
|
||||
},
|
||||
methods: {
|
||||
cancelClick(isRefresh) {
|
||||
this.$emit('cancelClick', isRefresh !== undefined ? isRefresh : false);
|
||||
},
|
||||
//日期处理
|
||||
dateFormat(dataStr) {
|
||||
return dataStr.replace('T', ' ').split('.')[0];
|
||||
},
|
||||
async _getPageList() {
|
||||
if (this.dataInfoObj.FTeamID) {
|
||||
let postObj = {
|
||||
FTeamID: this.dataInfoObj.FTeamID,
|
||||
FType: this.dataInfoObj.FType,
|
||||
FPageSize: 99999
|
||||
};
|
||||
let result = await getPageList(postObj, 'OperateLog');
|
||||
this.dataList = result.Data.List || [];
|
||||
this.dataList.forEach(item => {
|
||||
item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<lay-container :style="'height:'+(taskInfoObj.FType==10?'420':'366')+'px'">
|
||||
<lay-form :model="editDataInfo" class="edit-info color999" :initValidate="false">
|
||||
<lay-form-item label="物料描述" prop="FName" required :initValidate="false">
|
||||
<lay-input v-model="editDataInfo.FName" style="width:calc(100% - 76px);margin-right:10px" disabled="true"></lay-input>
|
||||
<lay-button :disabled="editDataInfo&&editDataInfo.FIsMdm" type="normal" @click="selectMaterial">选择
|
||||
</lay-button>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="物料编号" prop="FCode" required :initValidate="false">
|
||||
<lay-input v-model="editDataInfo.FCode" style="width:calc(100% - 76px);margin-right:10px" disabled="true"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item v-if="taskInfoObj.FType==10||editDataInfo.FID" label="物料组" prop="FGroup">
|
||||
<lay-select v-model="editDataInfo.FGroup" v-if="seletList[1].length>0">
|
||||
<lay-select-option v-for="(rV,rI) in seletList[1]" key="rI" :value="rV.FValue+''" :label="rV.FName">
|
||||
</lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="单位" prop="FUnit" required>
|
||||
<lay-select v-model="editDataInfo.FUnit" v-if="seletList[0].length>0">
|
||||
<lay-select-option v-for="(rV,rI) in seletList[0]" key="rI" :value="rV.FValue+''"
|
||||
:label="rV.FValue">
|
||||
</lay-select-option>
|
||||
</lay-select>
|
||||
<p class="note3" v-if="editDataInfo.FUnit&&seletList[0].find(s=>s.FValue==editDataInfo.FUnit)!=null">
|
||||
{{ seletList[0].find(s=>s.FValue==editDataInfo.FUnit).FName }}
|
||||
</p>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="包规对应尺寸" prop="FIsPackageSize">
|
||||
<lay-radio v-model="editDataInfo.FIsPackageSize" name="FIsPackageSize" :value="1">对应</lay-radio>
|
||||
<lay-radio v-model="editDataInfo.FIsPackageSize" name="FIsPackageSize" :value="0">不对应</lay-radio>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="包材外形尺寸" prop="FOutSize">
|
||||
<lay-input v-model="editDataInfo.FOutSize" placeholder="长*宽*高(mm)"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="包材重量(kg)" prop="FWeight">
|
||||
<lay-input v-model="editDataInfo.FWeight"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="数量" prop="FCount">
|
||||
<lay-input v-model="editDataInfo.FCount"></lay-input>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
<view class="menuBtn" v-show="taskInfoObj.FType==10||!editDataInfo.FID">
|
||||
<lay-button type="danger" @click="submitClick">提交</lay-button>
|
||||
<lay-button @click="$emit('cancelClick')">取消</lay-button>
|
||||
</view>
|
||||
<lay-layer :area="['70%','80%']" v-model="showEditBox" title="选择包材">
|
||||
<MaterialSelect :dataInfoObj="editDataInfo" @selectClick="selectClick" @cancelClick="showEditBox=false">
|
||||
</MaterialSelect>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.edit-info {
|
||||
width: 90%;
|
||||
padding-right: 30px;
|
||||
margin: 30px auto 10px;
|
||||
}
|
||||
|
||||
.menuBtn {
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 96%;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.empty-small2 {
|
||||
max-width: 96%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.empty-small2>.layui-btn {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
margin: 12px auto 2px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import {
|
||||
ref,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import {
|
||||
dockMDMCode
|
||||
} from "/src/api/api/package";
|
||||
import {
|
||||
getPageList,
|
||||
getDataCode
|
||||
} from "/src/api/api/common";
|
||||
import MaterialSelect from "./MaterialSelect.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MaterialSelect
|
||||
},
|
||||
setup() {
|
||||
const editDataInfo = ref({});
|
||||
const showEditBox = ref(false);
|
||||
const initValidate = ref(false);
|
||||
return {
|
||||
editDataInfo,
|
||||
showEditBox,
|
||||
initValidate,
|
||||
seletList: ref([
|
||||
[],
|
||||
[]
|
||||
])
|
||||
}
|
||||
},
|
||||
props: {
|
||||
dataInfoObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
taskInfoObj: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this._getTypeList();
|
||||
if (this.dataInfoObj) {
|
||||
this.editDataInfo = JSON.parse(JSON.stringify(this.dataInfoObj));
|
||||
} else {
|
||||
this.editDataInfo.FUnit = "EA";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectMaterial() {
|
||||
this.showEditBox = true;
|
||||
},
|
||||
async _getTypeList() {
|
||||
let result = await getDataCode({
|
||||
FType: '1,2'
|
||||
});
|
||||
this.seletList[0] = result.FType1 || [];
|
||||
this.seletList[1] = result.FType2 || [];
|
||||
},
|
||||
selectClick(item) {
|
||||
this.editDataInfo.FMaterialID = item.FID;
|
||||
this.editDataInfo.FName = item.FName;
|
||||
this.editDataInfo.FCode = item.FCode || "";
|
||||
this.showEditBox = false;
|
||||
},
|
||||
async _submitData(layId, data) {
|
||||
layer.close(layId);
|
||||
this.editDataInfo.FCode = data.FCode || "";
|
||||
this.editDataInfo.FMaterialID = data.FMaterialID || -1;
|
||||
this.editDataInfo.FGroup = data.FGroup || this.editDataInfo.FGroup || "";
|
||||
if (this.taskInfoObj.FType == 10) {
|
||||
let idx = layer.load(2);
|
||||
let postData = JSON.parse(JSON.stringify(this.taskInfoObj));
|
||||
postData.FList = JSON.stringify([this.editDataInfo]);
|
||||
let result = await dockMDMCode(postData);
|
||||
layer.close(idx);
|
||||
this.$emit('cancelClick', true);
|
||||
} else {
|
||||
this.$emit('submitClick', this.editDataInfo);
|
||||
}
|
||||
},
|
||||
async submitClick() {
|
||||
if (!this.editDataInfo.FName) return this.editDataInfo.FName = "";
|
||||
let result = await getPageList({
|
||||
FPageIndex: 1,
|
||||
FPageSize: 1,
|
||||
FType: 40,
|
||||
FName: this.editDataInfo.FName.trim() || ""
|
||||
}, "Material");
|
||||
let list = result.Data.List || [];
|
||||
let $this = this;
|
||||
let data = {};
|
||||
let message = "系统检索到您使用的是新物料,请确认?";
|
||||
if (list.length > 0) {
|
||||
data = list[0];
|
||||
message = "系统检索到您使用的是旧物料,请确认?";
|
||||
}
|
||||
layer.confirm(message, {
|
||||
title: "提示",
|
||||
btn: [{
|
||||
text: this.taskInfoObj.FType == 10 ? '提交MDM' : '确定',
|
||||
callback: function(id) {
|
||||
$this._submitData(id, data);
|
||||
}
|
||||
}, {
|
||||
text: '取消',
|
||||
callback: function(id) {
|
||||
layer.close(id);
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||