Commit 62c2528c authored by 黄媛媛's avatar 黄媛媛

采购物资

parent 773fb990
......@@ -38,7 +38,7 @@
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<div class="searchInput" style="width:250px">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px"
......@@ -48,7 +48,7 @@
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span @click="Clearconditions" v-if="msg.Name!='' || msg.CategoryIds!='' || (dateList && dateList.length>0)" class='blue point'>清空筛选条件</span>
</div>
......
......@@ -172,7 +172,16 @@
<li class="menu_item" :class="{'Fchecked':isChecked=='/empowerManage'}" @click="isChecked='/empowerManage',CommonJump('empowerManage')">
<i class="el-icon-menu"></i><span>授权列表</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/materialQuery'}" @click="isChecked='/materialQuery',CommonJump('materialQuery')">
<i class="el-icon-menu"></i><span>物料查询</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/procurementMaage'}" @click="isChecked='/procurementMaage',CommonJump('procurementMaage')">
<i class="el-icon-menu"></i><span>采购管理</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked=='/Materialwarehouse'}" @click="isChecked='/Materialwarehouse',CommonJump('Materialwarehouse')">
<i class="el-icon-menu"></i><span>物料仓库</span>
</li>
</ul>
</div>
</div>
......
<style>
.Materialwarehouse .template_comheader {
padding: 13px 20px;
border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
}
.Materialwarehouse .template_comheader>div {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.Materialwarehouse .temp_content {
margin-top: 10px;
background: #fff;
padding: 20px;
}
.Materialwarehouse .temp_imgStyle {
display: inline-block;
margin-right: 10px;
}
.Materialwarehouse .app-add-cat .el-checkbox-group{
font-size: 14px!important;
}
.Materialwarehouse .app-add-cat .el-checkbox {
margin-right: 0;
}
.Materialwarehouse .app-add-cat .el-dialog__body{
padding:10px 20px!important;
}
.Materialwarehouse .app-add-cat .tag-box .tag-item {
margin-right: 5px;
}
.Materialwarehouse .app-add-cat .tag-box {
margin: 20px 0;
}
.Materialwarehouse .app-add-cat .app-goods-cat-list .active {
background: #FAFAFA;
}
.Materialwarehouse .app-add-cat .app-goods-cat-list .cat-item {
cursor: pointer;
padding: 5px 10px;
}
.Materialwarehouse .app-add-cat .app-goods-cat-list {
border: 1px solid #E8EAEE;
border-radius: 5px;
margin-top: -5px;
padding: 10px 0;
overflow: scroll;
height: 400px;
}
.Materialwarehouse .el-table td, .el-table th{
padding: 5px 0;
font-size: 14px;
}
</style>
<template>
<div class="Materialwarehouse">
<div class="template_comheader">
<div>
<span>物料仓库</span>
<el-button type="primary" size="small" @click="flDig=true,addMsg.Id = 0,addMsg.Name=''">新增仓库</el-button>
</div>
</div>
<div class="temp_content">
<div>
<div class="searchInput" style="width:250px;margin-right: 10px;">
<el-input @keyup.enter.native="msg.pageIndex=1,getList()" style="display:inline-block;width:225px;height:30px"
placeholder="请输入商品名称"
v-model="msg.Name"
@clear="msg.pageIndex=1,getList()"
size="small"
clearable>
</el-input>
<span @click="msg.pageIndex=1,getList()" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table :data="dataList" border style="width: 100%;margin-Top:10px">
<el-table-column prop="Name" label="仓库名称" ></el-table-column>
<el-table-column prop="UpdateDate" label="操作时间" ></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img src="../../assets/img/setup/edit.png" alt="" class="temp_imgStyle" @click="EditeTemplate(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="DeleteTemplate(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :current-page.sync="msg.pageIndex"
:page-size="msg.pageSize" layout="prev, pager, next" :total="total">
</el-pagination>
</div>
<!-- 选择分类 -->
<el-dialog custom-class="app-add-cat" :title="addMsg.Id == 0 ?'新增仓库':'编辑仓库' " :visible.sync="flDig" width="700px">
<el-form
:model="addMsg"
:rules="rules"
ref="addMsg"
label-width="100px"
>
<el-form-item label="仓库名称" size="small" prop="Name">
<el-input
type="text"
size="small"
maxlength="200"
v-model="addMsg.Name"
>
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="flDig = false">取 消</el-button>
<el-button @click="submitForm('addMsg')" size="small" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dataList: [],
msg: {
pageIndex: 1,
pageSize: 15,
Name:'',
},
addMsg:{
Id:0,
Name:'',
Contact:'',
Mobile:'',
},
flDig:false,
total: 0,
rules:{
Name: [
{ required: true, message: '请输入仓库名称', trigger: 'blur' }
]
},
};
},
created() {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.apiJavaPost("/api/Supplies/GetWareHousePageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
submitForm(msg){
this.$refs[msg].validate(valid => {
if (valid) {
this.apiJavaPost(
"/api/Supplies/SetWareHouseInfo",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.flDig=false;
this.getList();
} else {
this.Info(res.data.message);
}
}
);
} else {
return false;
}
});
},
EditeTemplate(row){
this.addMsg.Id = row.Id;
this.addMsg.Name = row.Name;
this.flDig=true
},
DeleteTemplate(row){
let Id=row.Id;
this.$confirm("确认删除该仓库?","提示", {
confirmButtonText:"确定",
cancelButtonText: "取消",
type: 'warning'
}).then(() => {
this.apiJavaPost("/api/Supplies/DelWareHouseInfo",{WareHouseId:Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
this.$message.info('已取消删除!')
});
}
},
mounted() {
this.getList();
}
};
</script>
......@@ -126,7 +126,7 @@ export default {
methods: {
//获取集团授权信息
getEmployeeData(data) {
this.apipost(
this.assetsApipost(
"/api/Authorize/GetAuthorizeModel",
{
Type:data.Type,
......@@ -149,7 +149,7 @@ export default {
);
},
getEmployeeList(){
this.apipost(
this.assetsApipost(
"/api/Employee/GetEmployeeList",
{},
res => {
......@@ -164,7 +164,7 @@ export default {
submitForm(msg){
this.$refs[msg].validate(valid => {
if (valid) {
this.apipost(
this.assetsApipost(
"/api/Authorize/SetAuthorize",
this.msg,
res => {
......
......@@ -97,7 +97,7 @@
this.getList();
},
getList() {
this.apipost("/api/Authorize/GetAuthorizePageList", this.msg, res => {
this.assetsApipost("/api/Authorize/GetAuthorizePageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
......@@ -117,7 +117,7 @@
DeleteTemplate(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Authorize/DelERPAuthorize", {
that.assetsApipost("/api/Authorize/DelERPAuthorize", {
ID: item.ID,
}, res => {
if (res.data.resultCode == 1) {
......
......@@ -81,7 +81,7 @@ export default {
//获取集团授权信息
GetWeiXinAppConfig() {
// type 1-个人,2-集团
this.apipost(
this.assetsApipost(
"/api/Authorize/GetAuthorizeModel",
{Type:2},
res => {
......@@ -99,7 +99,7 @@ export default {
submitForm(msg){
this.$refs[msg].validate(valid => {
if (valid) {
this.apipost(
this.assetsApipost(
"/api/Authorize/SetAuthorize",
{
ID:this.msg.ID? this.msg.ID:0,
......
This diff is collapsed.
This diff is collapsed.
<style>
.putinStorage .mimitBody {
padding: 20px;
background-color: #fff;
margin: 10px 0 20px 0;
display: table;
width: 100%;
}
.putinStorage .tpEdit_header {
padding: 18px;
background: #fff;
color: #606266;
margin-bottom: 10px;
}
.putinStorage .mimitList {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
.putinStorage .mimitBody .el-tag {
min-width: 120px;
padding-right: 50px;
}
.putinStorage .el-button--small {
padding: 9px 25px;
}
</style>
<template>
<div class="putinStorage">
<div class="tpEdit_header">
<span style="color:rgb(64, 158, 255);cursor:pointer;" @click="CommonJump('procurementMaage')">采购管理</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>入库</span>
</div>
<div class="mimitBody">
<div>
<span>仓库名称:{{Detaildata.WareHouseName}}</span>
<span style="margin-left:30px">备注:{{Detaildata.Remark}}</span>
</div>
<el-table :data="Detaildata.DetailList" border style="width: 100%;margin-Top:20px">
<el-table-column prop="Id" label="ID" width="60"></el-table-column>
<el-table-column prop="ImageList" label="图片" width="80" align='center'>
<template slot-scope="scope">
<img :src="scope.row.MaterialModel.ImageList[0]" alt="" style="width: 50px; height: 50px;">
</template>
</el-table-column>
<el-table-column prop="Name" label="商品名称" >
<template slot-scope="scope">
<span>{{scope.row.MaterialModel.Name}}</span>
</template>
</el-table-column>
<el-table-column prop="GoodsSpecificationList" label="规格" >
<template slot-scope="scope">
<span v-for="(x,y) in scope.row.MaterialModel.GoodsSpecificationList" :key="y">{{x}} <span v-if="scope.row.MaterialModel.GoodsSpecificationList.length !== y+1"> , </span></span>
</template>
</el-table-column>
<el-table-column prop="Number" label="数量" width="60"></el-table-column>
<el-table-column prop="StockInNum" label="已入数量" width="80">
<template slot-scope="scope">
<span>{{scope.row.StockInNum!=null?scope.row.StockInNum:0}}</span>
</template>
</el-table-column>
<el-table-column prop="" label="入库数量" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.InStockNum" type="number" :min='0'
:max="scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0)"
:disabled="(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0))==0? true:false"
placeholder="请输入"></el-input>
</template>
</el-table-column>
</el-table>
</div>
<el-button size="small" type="primary" @click="submitForm()" >入库</el-button
>
</div>
</template>
<script>
export default {
data() {
return {
Detaildata:{}
};
},
created() {},
methods: {
getProcurementInfo(data) {
console.log(data)
this.assetsApipost("/api/property/GetProcurementInfo", {ProcurementId:data.ID}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
data.DetailList.forEach(x => {
x.InStockNum = 0
});
this.Detaildata = data
} else {
this.Error(res.data.message);
}
})
},
submitForm(){
let msg = {
Id:0,
DetailList:[]
};
msg.Id = this.Detaildata.Id;
let showtis = false
this.Detaildata.DetailList.forEach(x=>{
if(x.InStockNum.length== 0){
showtis=true
}
let obj = {}
obj.GoodsId = x.MaterialModel.GoodsId;
obj.SpecificationKey = x.MaterialModel.SpecificationKey;
obj.InStockNum = x.InStockNum;
msg.DetailList.push(obj)
})
if(showtis == true){
this.Error('请输入入库数量');
return
}
this.assetsApipost("/api/property/SetProcurementStockIn", msg, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
// this.getProcurementInfo(this.$route.query)
this.CommonJump('procurementMaage')
} else {
this.Error(res.data.message);
}
})
}
},
mounted() {
this.getProcurementInfo(this.$route.query)
}
};
</script>
......@@ -56,8 +56,8 @@ export default {
let domainUrl = '';
// domainUrl = "https://mallapi.oytour.com";
// domainUrl = "https://localhost:5001";
domainUrl = "http://192.168.2.65";
// domainUrl = "http://192.168.2.16:8088";
// domainUrl = "http://192.168.2.65";
domainUrl = "http://192.168.2.16:8088";
let locationName = window.location.hostname;
......@@ -69,6 +69,10 @@ export default {
var obj = {
//主地址npm
DomainUrl: domainUrl,
//资产管理
javaUrl: "http://192.168.2.65:8018",
// javaUrl: "http://192.168.2.16:8087",
// javaUrl: "http://property.oytour.com",
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
ImageUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com',
......@@ -275,6 +279,94 @@ export default {
}
return postData
},
//HTTP提交数据资产
Vue.prototype.assetsApipost = function(cmd, msg, successCall, faildCall, isOnline) {
var apiurl = this.domainManager().DomainUrl + cmd;
var postData = this.GetAssetsPostData(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
}, faildCall)
}
//获取请求参数
Vue.prototype.GetAssetsPostData = function(cmd, msg, newCmd) {
if (msg == null || msg == "") {
msg = {}
}
var timestamp = (new Date()).valueOf();
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != "" &&
this.$route.path.toLowerCase() != "/login" &&
this.$route.path.toLowerCase() != "/register" &&
this.$route.path.toLowerCase() != "/forgetpassword"
) {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
var TenantId = "0"; //商户Id
var EmpId = 0; //员工编号【员工登录时使用】
var ERPGroupId = 0;
var ERPEmpId = 0;
var ERPBranchId = 0;
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
EmpId = this.getLocalStorage().EmpId;
ERPGroupId = this.getLocalStorage().ERPGroupId;
ERPEmpId = this.getLocalStorage().ERPEmpId;
ERPBranchId = this.getLocalStorage().ERPBranchId;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
tempLanguage = 1;
} else if (localStorage.language == "Japanese") {
tempLanguage = 2;
}
}
var cmdStr = "";
if (newCmd) {
cmdStr = newCmd;
}
var postData = {
msg: msg,
timestamp: timestamp,
token: token,
sign: md5Str,
languageId: tempLanguage,
cmd: cmdStr,
MallBaseId: MallBaseId,
TenantId: TenantId,
EmpId: EmpId,
ERPGroupId: ERPGroupId,
ERPEmpId: ERPEmpId,
ERPBranchId: ERPBranchId,
// MiniAppId:"wxacd9f8cc3480d29e",
// OpenId:"ow_7I5ZQKhAB66yvOTGI35Xk-Kmg",
// UserId:19992,
}
return postData
},
//文件下载
Vue.prototype.GetLocalFile = function(cmd, msg, fileName, newCmd, successCall) {
var apiurl = this.domainManager().DomainUrl + cmd;
......@@ -293,6 +385,64 @@ export default {
link.click();
successCall(res);
}).catch(function(res) {});
},
//调用资产的接口
Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().javaUrl + cmd;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
var TenantId = "0"; //商户Id
var uid = "0"
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
TenantId = this.getLocalStorage().TenantId;
uid =this.getLocalStorage().ERPEmpId
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`msg=YXZCGL2020&timestamp=${timestamp}&token=${token}&key=${key}`);
// var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"MallBaseId": MallBaseId,
"TenantId": TenantId,
'uid':uid
}
if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId = 2;
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else {
successCall(res)
}
}, faildCall)
}
}
}
\ No newline at end of file
......@@ -122,12 +122,37 @@ export default new Router({
name: 'empowerManage',
component: resolve => require(['@/components/empower/empowerManage'], resolve),
},
//授权中心 授权管理
//授权中心 授权详情
{
path: '/empowerEdit',
name: 'empowerEdit',
component: resolve => require(['@/components/empower/empowerEdit'], resolve),
},
//授权中心 物料管理
{
path: '/materialQuery',
name: 'materialQuery',
component: resolve => require(['@/components/empower/materialQuery'], resolve),
},
//授权中心 采购管理
{
path: '/procurementMaage',
name: 'procurementMaage',
component: resolve => require(['@/components/empower/procurementMaage'], resolve),
},
//授权中心 物料仓库
{
path: '/Materialwarehouse',
name: 'Materialwarehouse',
component: resolve => require(['@/components/empower/Materialwarehouse'], resolve),
},
//授权中心 入库
{
path: '/putinStorage',
name: 'putinStorage',
component: resolve => require(['@/components/empower/putinStorage'], resolve),
},
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment