组件提交

20231126-yw
wj 1 year ago
parent 0759271628
commit 0beaaaf318

@ -57,6 +57,10 @@ Vue.config.silent = true;
//自定义消息框
import ShowMsgBox from '@/utils/MsgBox'
import invSelect from "@/views/components/invSelect/invSelect.vue";
import mainActionSelect from "@/views/components/mainActionSelect/index.vue";
import thirdSysSelect from "@/views/components/thirdSysSelect/index.vue";
import actionSelect from "@/views/components/actionSelect/index.vue";
// 全局方法挂载
Vue.prototype.getDicts = getDicts;
@ -80,6 +84,10 @@ Vue.component("ImageUpload", ImageUpload);
Vue.component("ImagePreview", ImagePreview);
Vue.component('split-pane', splitPane);
Vue.component("cusEditor", cusEditor)
Vue.component("invSelect", invSelect)
Vue.component("mainActionSelect", mainActionSelect)
Vue.component("thirdSysSelect", thirdSysSelect)
Vue.component("actionSelect", actionSelect)
Vue.use(directive);
Vue.use(plugins);

@ -0,0 +1,4 @@
export const mainActionMap = {
WareHouseIn: '入库',
WareHouseOut: '出库'
}

@ -0,0 +1,51 @@
import {getLocalJoinByUser} from "@/api/basic/busType";
export default {
name: "actionSelect",
props: {value:"",invCode:{required:true},mainAction:null},
data() {
return {
val: '',
list:[],
}
},
watch: {
mainAction(){
this.val = null
this.getList()
},
invCode(){
this.val = null
this.getList()
},
val(newVal) {
this.$emit('update:value', newVal);
},
value(newVal) {
this.val = newVal
},
},
created() {
this.getList()
},
methods: {
getList(){
if(!this.invCode){
return
}
let query = {
code: this.invCode,
enable: true,
mainAction: this.mainAction,
vueType: "supInvoice",
};
getLocalJoinByUser(query)
.then((response) => {
this.list = response.data.list || [];
})
.catch(() => {
});
}
}
}

@ -0,0 +1,16 @@
<template>
<el-select v-model="val" :disabled="!invCode" placeholder="请选择单据类型"
style="width: 90%"
clearable>
<el-option
v-for="item in list"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</template>
<script src="./index.js">
</script>

@ -0,0 +1,41 @@
import {getInvListByUser} from "@/api/system/invWarehouse";
export default {
name: "invSelect",
props: {value:""},
data() {
return {
invCode: '',
invList: [],
}
},watch: {
invCode(newVal) {
this.$emit('update:value', newVal);
},
value(newVal) {
this.invCode = newVal
},
},
methods: {
invChange(){
this.$emit('update:value', this.invCode);
// this.changeValue(this.invCode)
},
getList() {
let query = {
advanceType: 1,
};
getInvListByUser(query)
.then((response) => {
this.invList = response.data || [];
})
.catch(() => {
});
},
},
created() {
this.getList()
}
}

@ -0,0 +1,16 @@
<template>
<el-select v-model="invCode" placeholder="请选择所属仓库" clearable
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</template>
<script src="./invSelect.js"/>

@ -0,0 +1,27 @@
export default {
name: "mainActionSelect",
props: {value:""},
data() {
return {
mainAction: ''
}
},
watch: {
mainAction(newVal) {
this.$emit('update:value', newVal);
},
value(newVal) {
this.mainAction = newVal
},
},
created() {
if(this.value==null){
this.$emit('update:value', '');
}
},
methods: {
}
}

@ -0,0 +1,11 @@
<template>
<el-select v-model="mainAction" placeholder="请选择出入库类型" clearable style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="入库" value="WareHouseIn"></el-option>
<el-option label="出库" value="WareHouseOut"></el-option>
</el-select>
</template>
<script src="./index.js">
</script>

@ -0,0 +1,33 @@
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
export default {
name: "thirdSysSelect",
props: {value:""},
data() {
return {
val: '',
list:[],
}
},
watch: {
val(newVal) {
this.$emit('update:value', newVal);
},
value(newVal) {
this.val = newVal
},
},
created() {
this.getList()
},
methods: {
getList(){
getBasicThirdSys({enable: true}).then(res=>{
if(res.code==20000){
this.list = res.data.list||[]
}
})
}
}
}

@ -0,0 +1,9 @@
<template>
<el-select v-model="val" placeholder="请选择第三方系统" style="width: 90%" clearable>
<el-option v-for="item in list" :key="item.id" :label="item.thirdName" :value="item.id"/>
</el-select>
</template>
<script src="./index.js">
</script>

@ -9,7 +9,7 @@ const CompressionPlugin = require("compression-webpack-plugin");
const name = process.env.VUE_APP_TITLE || "UDI管理系统"; // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口
const port = process.env.port || process.env.npm_config_port || 83; // 端口
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions

Loading…
Cancel
Save