master
lion 11 months ago
parent 712191b4c1
commit 2a475bbb6f

@ -1,16 +1,10 @@
# just a flag
ENV='development'
# base api
#VUE_APP_BASE_API = http://192.168.60.99:9004/
#VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file
#VUE_APP_OA_URL = http://192.168.60.18:2021
#VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
VUE_APP_BASE_API = http://192.168.60.99:8004/
VUE_APP_UPLOAD_API = http://192.168.60.99:8004/api/admin/upload-file
VUE_APP_OA_URL= http://192.168.60.18:8001
VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39",'采购入库':40}'
VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":43,"调拨入库":52,"领用出库":37,"处置出库":38,"调拨出库":53}'

@ -3,21 +3,17 @@ ENV = 'production'
# base api
#http://192.168.60.99:9004/
VUE_APP_BASE_API = ''
VUE_APP_UPLOAD_API = /api/admin/upload-file
VUE_APP_BASE_API = 'http://192.168.60.99:8004/'
VUE_APP_UPLOAD_API = 'http://192.168.60.99:8004/api/admin/upload-file'
# 正式oa
#VUE_APP_OA_URL = http://192.168.60.18:2021
#VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
#VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":43,"调拨入库":52,"领用出库":37,"处置出库":38,"调拨出库":53}'
#测试oa
VUE_APP_OA_URL = http://192.168.60.18:8001
VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":43,"调拨入库":52,"领用出库":37,"处置出库":38,"调拨出库":53}'
#VUE_APP_BASE_API = http://192.168.60.99:8004/
#VUE_APP_UPLOAD_API = http://192.168.60.99:8004/api/admin/upload-file
#VUE_APP_OA_URL= http://suzhouhedaooa.langye.net
#VUE_APP_OA_URL_TYPE = '{"领用":"31","处置":"32"}'

@ -6,9 +6,8 @@ ENV = 'staging'
# base api
#http://192.168.60.99:9004/
VUE_APP_BASE_API =
VUE_APP_UPLOAD_API = /api/admin/upload-file
VUE_APP_OA_URL = http://192.168.60.18:2021
VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
#VUE_APP_BASE_API = '/stage-api'
VUE_APP_BASE_API = http://192.168.60.99:8004/
VUE_APP_UPLOAD_API = http://192.168.60.99:8004/api/admin/upload-file
VUE_APP_OA_URL= http://192.168.60.18:8001
VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":43,"调拨入库":52,"领用出库":37,"处置出库":38,"调拨出库":53}'

@ -11,19 +11,24 @@
</div>
</div>
<div class="jscC-center">
<div class="jscC-center-left">
<div style="display: flex; justify-content: space-between;">
<span
<div class="jscC-center-left" >
<div class="jscC-center-left-title">物资数量统计</div>
<div class="jscC-center-left-content">
<div v-for="item in upList">
<span>{{item.name}}</span>
<span>{{item.total}}{{item.unit?item.unit:''}}</span>
</div>
<!-- <span
v-for="item in Object.keys(chartDataMap)"
:key="item"
:class="['custom-btn', { active: activeType === item }]"
@click="handleTypeClick(item)"
>
{{ item }}
</span>
</span> -->
</div>
<!-- <Bar3DChart></Bar3DChart> -->
<fenleiChart :chart-data="chartData" />
<!-- <fenleiChart :chart-data="chartData" /> -->
</div>
<div class="jscC-center-center">
<echartsMap ref="echartsMap" />
@ -72,7 +77,8 @@ export default {
contentStyle: {
width: 0,
height: 0
},
},
upList:[],
topObj: [{
label: '仓库数量',
value: 0,
@ -81,15 +87,17 @@ export default {
label: '物资种类',
value: 0,
id: 'wuzizhonglei_count'
}, {
label: '本月出库',
value: 0,
id: 'chuku_month_count'
}, {
label: '本月入库',
value: 0,
id: 'ruku_month_count'
}, {
},
// {
// label: '',
// value: 0,
// id: 'chuku_month_count'
// }, {
// label: '',
// value: 0,
// id: 'ruku_month_count'
// },
{
label: '应急调度次数',
value: 0,
id: 'yingjidiaodu_count'
@ -142,7 +150,7 @@ export default {
yData: [],
todoList: [{
id: 'gongdan',
value: '工单'
value: '凋令'
}, {
id: 'pandian',
value: '盘点'
@ -200,8 +208,9 @@ export default {
})
console.log(this.xData, this.yData)
//
this.apiData = res.fenleiLevel1
this.chartDataMap = this.convertFenleiToChartDataMap(this.apiData)
// this.apiData = res.fenleiLevel1
// this.chartDataMap = this.convertFenleiToChartDataMap(this.apiData)
this.upList = res.upList
},
//
convertFenleiToChartDataMap(fenleiLevel1) {
@ -370,7 +379,6 @@ export default {
// flex-wrap: wrap;
&-left {
// width:5.3rem;
&-title {
color: #6dcde6;
text-align: center;
@ -378,7 +386,16 @@ export default {
margin-bottom: 10px;
font-size: 16px;
}
&-content{
width: 450px;
height: 400px;
&>div{
text-align: center;
margin:10px 0;
color:#fff;
font-size: 16px;
}
}
.custom-btn {
background: #0b1b3a;
color: #19eaff;

@ -62,6 +62,16 @@
</div>
</div>
</template>
<template v-slot:unit>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>统计单位
</div>
<div class="xy-table-item-content">
<el-input v-model="form.unit" placeholder="请填写统计单位" clearable style="width: 300px;" />
</div>
</div>
</template>
<template v-slot:chubeinianxian>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -142,6 +152,7 @@ export default {
pid: 0,
name:'',
is_chart:0,
unit:'',
chubeinianxian: '',
cunfangyaoqiu: '',
weihuyaoqiu: '',
@ -201,6 +212,7 @@ export default {
pid: res?.pid,
name:res?.name,
is_chart:res.is_chart?res.is_chart:0,
unit:res?.unit,
chubeinianxian: res?.chubeinianxian,
cunfangyaoqiu: res?.cunfangyaoqiu,
weihuyaoqiu: res?.weihuyaoqiu,

@ -135,7 +135,7 @@
<template v-if="activeStep===0" v-slot:zuozhengwenjian>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>出库文件
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>物资信息单
</div>
<div class="xy-table-item-content">
<el-upload
@ -479,8 +479,8 @@ export default {
mingxiList: [],
showLoading: true,
mingxiTable: [
{label:'id',
prop:'inventorys_id'},
// {label:'id',
// prop:'inventorys_id'},
{
label: '物资名称',
prop: 'zichanmingcheng',
@ -627,23 +627,23 @@ export default {
//
nextStep() {
if (this.activeStep === 0) {
// if (!this.form.chukushijian || !this.form.jilurenyuan) {
// Message({
// type: 'warning',
// message: ''
// })
// return
// }
// //
// if (this.chukuType === '') {
// if (!this.form.guanliandiaoling) {
// Message({
// type: 'warning',
// message: ''
// })
// return
// }
// }
if (!this.form.chukushijian || !this.form.jilurenyuan) {
Message({
type: 'warning',
message: '请填写数据'
})
return
}
//
if (this.chukuType === '调令') {
if (!this.form.guanliandiaoling) {
Message({
type: 'warning',
message: '请选择关联工单'
})
return
}
}
this.activeStep++
} else if (this.activeStep === 1) {
if (this.mingxiList.length === 0) {
@ -871,7 +871,8 @@ export default {
zuozhengwenjian: res.zuozhengwenjian ? res.zuozhengwenjian : [],
beizhu: res?.beizhu,
chukumingxi: ''
}
}
this.form.id = this.id
this.mingxiList = res.id_outbounds_items_outbounds_id_relation
this.fileList = []
const _lists = res.zuozhengwenjian_upload_details ? res.zuozhengwenjian_upload_details : []
@ -918,47 +919,21 @@ export default {
this.form.zuozhengwenjian.push(k.id)
}
}
// return
if (this.type === 'add') {
this.form.zhuangtai = '待处理'
save({
table_name: this.tableName,
...this.form
}).then(res => {
Message({
type: 'success',
message: '新增成功'
})
this.isShow = false
this.$emit('refresh')
})
return
}
if (this.type === 'editor' || this.type === 'outbounds') {
if (this.type === 'outbounds') {
this.form.zhuangtai = '已出库'
}
save({
id: this.id,
table_name: this.tableName,
...this.form
}).then(res => {
Message({
type: 'success',
message: '编辑成功'
})
if (this.form.zhuangtai = '已出库') {
desChuku({
outbound_id: this.id
}).then(res => {
})
}
this.isShow = false
this.$emit('refresh')
})
}
if(this.type==='add'){
this.form.zhuangtai = 0
delete this.form.id
}
save({
table_name: this.tableName,
...this.form
}).then(res => {
Message({
type: 'success',
message: '新增成功'
})
this.isShow = false
this.$emit('refresh')
})
}
}

@ -52,7 +52,7 @@
<!-- 提交记录单 -->
<div>
<div>签字确认</div>
<div>出库记录</div>
<el-upload
ref="upload"
class="upload-demo"
@ -127,6 +127,9 @@ import {
import {
Message
} from 'element-ui'
import {
desChuku
} from '@/api/system/log.js'
import {
getToken
} from '@/utils/auth'
@ -241,7 +244,7 @@ export default {
})
return
}
this.form.zhuangtai = '已出库'
this.form.zhuangtai = 3
save({
table_name: this.tableName,
...this.form
@ -249,6 +252,11 @@ export default {
Message({
type: 'success',
message: '出库成功'
})
desChuku({
outbound_id: this.id
}).then(res => {
})
this.isShow = false
this.$emit('refresh')

@ -0,0 +1,227 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow" type="normal" title="查看" class="contract-detail">
<template v-slot:normalContent>
<el-descriptions title="基本信息" :column="2" border>
<el-descriptions-item label="出库类型">{{form.chukuleixing}}</el-descriptions-item>
<el-descriptions-item label="出库日期">{{form.rukushijian}}</el-descriptions-item>
<el-descriptions-item label="借用仓库">{{form.jieyongcangku}}</el-descriptions-item>
<el-descriptions-item label="借用部门">{{form.jieyongbumen}}</el-descriptions-item>
<el-descriptions-item label="经办人">{{form.jilurenyuan}}</el-descriptions-item>
<el-descriptions-item label="物资信息单" :span="2">
<div v-for="item in zuozhengList">
<a style="color: blue;" :href="item.url" target="_blank">{{item.name}}</a>
</div>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{form.beizhu}}</el-descriptions-item>
</el-descriptions>
<div style="margin: 10px 0;font-weight: bold;color:#303133;font-size: 16px;">
物资明细
</div>
<xy-table style="width: 100%" :height="260" :is-page="false" :list="mingxiList" :table-item="mingxiTable">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
<div style="margin: 10px 0;font-weight: bold;color:#303133;font-size: 16px;">
出库记录单
</div>
<div>
<!-- 确认出库 -->
<div>
<template v-for="(item,index) in fileList">
<el-image
style="width: 100px; height: 100px"
:src="item.url"
:key="index"
:initial-index="index">
</el-image>
</template>
</div>
</div>
</template>
<template v-slot:footerContent>
<Button @click="isShow=false"></Button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save,
index,
show,
destroy
} from '@/api/system/baseForm.js'
import {
Message
} from 'element-ui'
export default {
components: {},
data() {
return {
id: '',
isShow: false,
tableName: 'outbounds',
zuozhengList:[],
fileList: [],
form: {
rukushijian: '',
rukuleixing: '',
pandianleixing: '',
jingbanren: '',
jilurenyuan: '',
baoguanrenyuan: '',
beizhu: '',
zuozhengwenjian: '',
rukutupian:''
},
mingxiList: [],
mingxiTable: [{
label: '序号',
type: 'index',
fixed: 'left',
width: 80
},
{
label: '物资名称',
prop: 'zichanmingcheng',
width: 180
},
{
label: '物资型号',
prop: 'guigexinghao',
width: 180
}, {
label: '物资类型',
prop: 'wuzileixing',
width: 120
}, {
label: '种类编码',
prop: 'wuzibianma',
width: 120
},{
label: '单位',
prop: 'jiliangdanwei',
width: 80
}, {
label: '生产日期',
prop: 'shengchanriqi',
width: 120
},{
label: '入库批次',
prop: 'rukupici',
width: 120
}, {
label: '在库数量',
prop: 'zaikushuliang',
width: 80
}, {
label: '借用数量',
prop: 'jieyongshuliang',
width: 80
}, {
label: '是否回库',
prop: 'shifouhuiku',
width: 80
}, , {
label: '回库日期',
prop: 'huikushijian',
width: 120
}
],
//
printArr: ''
}
},
watch: {
isShow(newVal) {
if (newVal) {
this.getDetail()
}else{
this.id = ''
this.fileList = []
this.zuozhengList = []
this.form = {
chukushijian: '',
guanliandiaoling: '',
chukuleixing: '',
jieyongcangku: '',
jieyongbumen: '',
jilurenyuan: '',
baofeiyuanyin: '',
zuozhengwenjian: '',
beizhu: '',
chukumingxi: ''
}
}
}
},
created() {
},
methods: {
async getDetail() {
const res = await show({
id: this.id,
table_name: this.tableName
})
this.form = {
chukushijian: res?.chukushijian,
zhuangtai: res?.zhuangtai,
guanliandiaoling: res?.guanliandiaoling,
jieyongcangku: res?.jieyongcangku,
jieyongbumen: res?.jieyongbumen,
jilurenyuan: res?.jilurenyuan,
baofeiyuanyin: res?.baofeiyuanyin,
zuozhengwenjian: res.zuozhengwenjian ? res.zuozhengwenjian : [],
beizhu: res?.beizhu,
chukumingxi: ''
}
this.mingxiList = res.id_outbounds_items_outbounds_id_relation
this.zuozhengList = []
const _lists = res.zuozhengwenjian_upload_details ? res.zuozhengwenjian_upload_details : []
for (var f of _lists) {
this.zuozhengList.push({
name: f?.original_name,
url: f?.url,
response: f
})
}
this.fileList = []
const chuku_lists = res.qianzi_upload_details ? res.qianzi_upload_details : []
for (var f of chuku_lists) {
this.fileList.push({
name: f?.original_name,
url: f?.url,
response: f
})
}
},
}
}
</script>
<style scoped>
.step-content {
min-height: 300px;
}
.operation-bar {
display: flex;
justify-content: flex-end;
}
.step-complete {
display: flex;
justify-content: center;
align-items: center;
height: 300px;
}
</style>

@ -1,9 +1,9 @@
<template>
<div>
<div class="button-wrap">
<Button type="primary" @click="editorChuku('','add','领用')"></Button>
<Button type="primary" @click="editorChuku('','add','处置')"></Button>
<Button type="primary" @click="editorChuku('','add','调令')"></Button>
<Button type="primary" @click="editorChuku('','add','领用出库')"></Button>
<Button type="primary" @click="editorChuku('','add','处置出库')"></Button>
<Button type="primary" @click="editorChuku('','add','调令出库')"></Button>
</div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="`出库管理`" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
@ -13,6 +13,9 @@
<el-select v-model="select.chukuleixing" style="width: 200px;margin-right: 10px;" placeholder="出库类型" clearable>
<el-option v-for="item in chukuTypeList" :key="item.id" :value="item.id" :label="item.value"></el-option>
</el-select>
<el-select v-model="select.zhuangtai" style="width: 200px;margin-right: 10px;" placeholder="状态" clearable>
<el-option v-for="item in statusList" :key="item.id" :value="item.id" :label="item.value"></el-option>
</el-select>
<el-date-picker type="date" placeholder="发起日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="select.created_at" style="width: 200px;margin-right: 10px;" />
<el-date-picker type="date" placeholder="出库日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="select.chukushijian" style="width: 200px;margin-right: 10px;" />
<Button type="primary" @click="getindex"></Button>
@ -28,22 +31,49 @@
:table-item="table"
@pageSizeChange="e => select.pageSize = e"
@pageIndexChange="pageChange"
>
>
<template v-slot:zhuangtai>
<el-table-column label="状态" width="120" align="center" header-align="left">
<template slot-scope="scope">
<div v-for="item in statusList">
<el-tag :type="item.type" v-if="scope.row.zhuangtai==item.id">
{{ item.value }}
</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="300" header-align="center">
<template slot-scope="scope">
<!-- <template v-if="isCkName=='仓库管理员'||roleName=='系统管理员'">
<Button v-if="scope.row.zhuangtai===&quot;已办结&quot;" type="primary" size="small" style="margin-left: 10px;" @click="editorChuku(scope.row.id,'outbounds')"></Button>
</template> -->
<template v-if="scope.row.jilurenyuan==authName||isCkName=='仓库管理员'||roleName=='系统管理员'">
<Button v-if="scope.row.zhuangtai==='已办结'" type="primary" size="small" style="margin-left: 10px;" @click="printChuku(scope.row.id,scope.row.chukuleixing)"></Button>
<!-- <template v-if="scope.row.jilurenyuan==authName||roleName=='系统管理员'"> -->
<!-- <Button v-if="scope.row.zhuangtai==='已办结'" type="primary" size="small" style="margin-left: 10px;" @click="printChuku(scope.row.id,scope.row.chukuleixing)"></Button>
<Button type="primary" size="small" style="margin-left: 10px;" @click="editorChuku(scope.row.id,'editor',scope.row.chukuleixing)"></Button>
<Button v-if="scope.row.zhuangtai==='待处理'" type="primary" size="small" style="margin-left: 10px;" @click="tofollow(scope.row.id,scope.row)"></Button>
<Button v-if="scope.row.zhuangtai==='待处理'" type="primary" size="small" style="margin-left: 10px;" @click="toOaFollow(scope.row.id,scope.row.chukuleixing)"></Button>
<Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteChuku(scope.row)">
<Button type="error" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip>
<!-- </template> -->
</Poptip> -->
<template v-if="scope.row.zhuangtai==3 || scope.row.zhuangtai==1">
<Button style="margin-right: 10px;" type="primary" size="small"
@click="showChukuDetail(scope.row.id)">查看</Button>
</template>
<template v-else>
<Button v-if="scope.row.zhuangtai==0 || scope.row.zhuangtai==4" style="margin-right: 10px;" type="primary" size="small"
@click="editorChuku(scope.row.id,'editor',scope.row.chukuleixing)">编辑</Button>
<Button v-if="scope.row.zhuangtai==0 || scope.row.zhuangtai==4" style="margin-right: 10px;" type="primary" size="small"
@click="toOaFollow(scope.row.id,scope.row.chukuleixing)">发起流程</Button>
<Button v-if="scope.row.zhuangtai==2" style="margin-right: 10px;" type="primary" size="small"
@click="printChuku(scope.row.id)">确认出库</Button>
<Poptip v-if="scope.row.zhuangtai==0" transfer confirm title="确认要删除该出库记录?"
@on-ok="deleteChuku(scope.row)">
<Button type="error" size="small" ghost>删除</Button>
</Poptip>
</template>
</template>
</template>
</el-table-column>
@ -53,7 +83,7 @@
<addoutbounds ref="addoutbounds" @refresh="getindex" />
<printoutbounds ref="printoutbounds" @refresh="getindex" />
<imports ref="imports" :table-name="customForm.tableName" :form-info="form" @refresh="getindex" />
<showChuku ref="showChuku" @refresh="getindex"></showChuku>
</div>
</template>
@ -70,6 +100,7 @@ import {
getOatoken
} from '@/api/contract.js'
import addoutbounds from './component/addoutbounds.vue'
import showChuku from './component/showChuku.vue'
import printoutbounds from './component/printoutbounds.vue'
import {
Message
@ -83,18 +114,13 @@ import {
} from '@/api/system/dictionary'
export default {
components: {
addoutbounds,
addoutbounds,
showChuku,
imports,
printoutbounds
},
data() {
return {
window: {
width: 0,
height: 0,
top: 0,
left: 0
},
loading: false,
userName: '',
authName: '',
@ -105,20 +131,41 @@ export default {
pageIndex: 1,
keyword: '',
chukuleixing: '',
zhuangtai:'',
created_at:'',
chukushijian:''
},
chukuTypeList: [{
id: '领用',
id: '领用出库',
value: '领用出库'
}, {
id: '处置',
id: '处置出库',
value: '处置出库'
}, {
id: '调令',
id: '调令出库',
value: '调令出库'
}],
chukuType: '领用',
statusList:[{
id:0,
value:'待处理',
type:'info'
},{
id:1,
value:'待办结',
type:'warning'
},{
id:2,
value:'待出库',
type:''
},{
id:3,
value:'已出库',
type:'success'
},{
id:4,
value:'退回',
type:'danger'
}],
customForm: {
customFormId: '',
tableName: ''
@ -140,15 +187,15 @@ export default {
fixed: 'left'
},
{
label: '状态',
label: '出库类型',
width: 180,
prop: 'zhuangtai',
prop: 'chukuleixing',
align: 'center'
},
{
label: '出库类型',
label: '状态',
width: 180,
prop: 'chukuleixing',
prop: 'zhuangtai',
align: 'center'
},
{
@ -202,17 +249,13 @@ export default {
}
},
mounted() {
if (this.$route.path) {
const path = this.$route.path.split('_')[1]
const tableName = path == 'receive' ? 'lingyongchuku' : (path == 'disposition' ? 'baofeichuzhi' : 'yingjichuku')
getOutboundsStatus({
table: tableName
})
}
this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height) / 2
this.window.left = (window.screen.width - 10 - this.window.width) / 2
// if (this.$route.path) {
// const path = this.$route.path.split('_')[1]
// const tableName = path == 'receive' ? 'lingyongchuku' : (path == 'disposition' ? 'baofeichuzhi' : 'yingjichuku')
// getOutboundsStatus({
// table: tableName
// })
// }
this.getUserName()
this.getindex()
getOatoken().then(res => {
@ -220,6 +263,10 @@ export default {
})
},
methods: {
showChukuDetail(id){
this.$refs['showChuku'].id = id
this.$refs['showChuku'].isShow = true
},
async getUserName() {
getInfo().then(res => {
console.log('res', res)
@ -244,7 +291,13 @@ export default {
filter: [{ 'key': 'jilurenyuan', 'op': 'like', 'value': this.select.keyword },
{ 'key': 'chukuleixing', 'op': 'like', 'value': this.select.chukuleixing ? this.select.chukuleixing : '' },
{ 'key': 'created_at', 'op': 'like', 'value': this.select.created_at ? this.select.created_at : '' },
{ 'key': 'chukushijian', 'op': 'like', 'value': this.select.chukushijian ? this.select.chukushijian : '' }]
{ 'key': 'chukushijian', 'op': 'like', 'value': this.select.chukushijian ? this.select.chukushijian : '' },
{
'key': 'zhuangtai',
'op': 'like',
'value': this.select.zhuangtai ? this.select.zhuangtai : (this.select.zhuangtai===0?0:'')
}]
})
this.list = res.data
this.total = res.total
@ -270,64 +323,18 @@ export default {
this.$refs['printoutbounds'].chukuType = leixing
this.$refs['printoutbounds'].isShow = true
},
async tofollow(id, row) {
console.log(row)
if (row.id_outbounds_items_outbounds_id_relation.length < 1) {
Message({
type: 'warning',
message: '请补充出库物资'
})
return
}
console.log(row)
// return
let wuzimingcheng = ''
let shuliang = ''
let guigexinghao = ''
row.id_outbounds_items_outbounds_id_relation.map(item => {
wuzimingcheng += item.zichanmingcheng + '、'
shuliang += item.jieyongshuliang + '、'
guigexinghao += item.guigexinghao + '、'
})
const default_json = {
// 'yewukeshi':row.jieyongbumen,
// 'bianhao':row.chukushijian+'-'+row.id,
// 'wuzimingcheng':row.id_outbounds_items_outbounds_id_relation[0].zichanmingcheng,
// 'lingyongshijian':row.chukushijian,
// 'shuliang':row.id_outbounds_items_outbounds_id_relation[0].jieyongshuliang,
// 'xinghaoguige':row.id_outbounds_items_outbounds_id_relation[0].guigexinghao,
// 'jingbanren':row.jilurenyuan,
// 'beizhu':row.beizhu,
// 'gudingzichanbianhao':row.gudingzichanbianhao,
// 'baofeiyuanyin':row.baofeiyuanyin,
'wuzimingcheng': wuzimingcheng,
'shuliang': shuliang,
'xinghaoguige': guigexinghao,
'yewukeshi': row.jieyongbumen,
'bianhao': row.chukushijian + '-' + row.id,
'lingyongshijian': row.chukushijian,
'jingbanren': row.jilurenyuan,
'beizhu': row.beizhu,
'baofeiyuanyin': row.baofeiyuanyin,
'link_id': row.id
}
async toOaFollow(id, type) {
let typeid = ''
const typeObj = JSON.parse(process.env.VUE_APP_OA_URL_TYPE)
console.log("typeObj",typeObj,type)
for (var k in typeObj) {
if (k == row.chukuleixing) {
if (k == type) {
typeid = parseInt(typeObj[k])
}
}
// let res = await getOatoken()
// = this.chukuType==''?31:(this.chukuType==''?32:33)
// http://suzhouhedaooa.langye.net/admin/flow/create/31?username=admin&default_json={%22bianhao%22:%22100%22}
const url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${this.wuziguanli_oatoken}&username=${this.userName}&default_json=${JSON.stringify(default_json)}`
const seeBuy = window.open(url, 'follow',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
console.log(url)
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${this.wuziguanli_oatoken}&username=${this.authName}&link_id=${id}`
const seeBuy = window.open(url, '_blank')
},
deleteChuku(row) {
// return

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,336 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow" type="normal" title="查看" class="contract-detail">
<template v-slot:normalContent>
<el-descriptions title="基本信息" :column="2" border>
<el-descriptions-item label="入库类型">{{form.rukuleixing}}</el-descriptions-item>
<el-descriptions-item label="入库日期">{{form.rukushijian}}</el-descriptions-item>
<el-descriptions-item label="经办人">{{form.jingbanren}}</el-descriptions-item>
<el-descriptions-item label="记录人">{{form.jilurenyuan}}</el-descriptions-item>
<el-descriptions-item label="保管人" :span="2">{{form.baoguanrenyuan}}</el-descriptions-item>
<el-descriptions-item label="货物验收单" :span="2">
<div v-for="item in zuozhengList">
<a style="color: blue;" :href="item.url" target="_blank">{{item.name}}</a>
</div>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{form.beizhu}}</el-descriptions-item>
</el-descriptions>
<div style="margin: 10px 0;font-weight: bold;color:#303133;font-size: 16px;">
物资明细
</div>
<xy-table style="width: 100%" :height="260" :is-page="false" :list="mingxiList" :table-item="mingxiTable">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
<div style="margin: 10px 0;font-weight: bold;color:#303133;font-size: 16px;">
现场实物图
</div>
<div>
<!-- 确认入库 -->
<el-upload v-if="form.zhuangtai===2" ref="upload" list-type="picture-card" class="upload-demo" :action="action" multiple :headers="headers"
:before-upload="beforeUpload" :on-success="onSuccess" :on-error="onError" :on-remove="onRemove"
:file-list="fileList" :auto-upload="true">
<i class="el-icon-plus"></i>
</el-upload>
<div v-else>
<template v-for="(item,index) in fileList">
<el-image
style="width: 100px; height: 100px"
:src="item.url"
:key="index"
:initial-index="index">
</el-image>
</template>
</div>
</div>
</template>
<template v-slot:footerContent>
<Button @click="isShow=false"></Button>
<Button type="primary" v-if="form.zhuangtai===2" @click="submit"></Button>
</template>
</xy-dialog>
</div>
</template>
<script>
import {
save,
index,
show,
destroy
} from '@/api/system/baseForm.js'
import {
Message
} from 'element-ui'
import {
getToken
} from '@/utils/auth'
export default {
components: {},
data() {
return {
id: '',
isShow: false,
tableName: 'stocks',
zuozhengList:[],
fileList: [],
action: process.env.VUE_APP_UPLOAD_API,
headers: {
token: ''
},
form: {
rukushijian: '',
rukuleixing: '',
pandianleixing: '',
jingbanren: '',
jilurenyuan: '',
baoguanrenyuan: '',
beizhu: '',
zuozhengwenjian: '',
rukutupian:''
},
mingxiList: [],
mingxiTable: [{
label: '序号',
type: 'index',
fixed: 'left',
width: 80
},
{
label: '物资名称',
width: 180,
prop: 'zichanmingcheng',
align: 'left'
},
{
label: '所属种类',
width: 80,
prop: 'fenleiName',
align: 'center'
},
{
label: '种类编码',
width: 120,
prop: 'wuzibianma',
align: 'center'
},
{
label: '物资类型',
width: 120,
prop: 'wuzileixing',
align: 'center'
},
{
label: '物资型号',
width: 120,
prop: 'guigexinghao',
align: 'left'
},
{
label: '物资规格',
width: 120,
prop: 'wuziguige',
align: 'left'
},
{
label: '单位',
width: 80,
prop: 'jiliangdanwei',
align: 'center'
}, {
label: '在库数量',
prop: 'zaikushuliang',
width: 80
},
{
label: '入库批次',
prop: 'rukupici',
width: 120
}, {
label: '入库数量',
prop: 'rukushuliang',
width: 80
}
// ,{
// label: "",
// prop: "wuzizhuangtai",
// width: 180
// },{
// label: "",
// prop: "shengchanriqi",
// width: 180
// },
],
//
printArr: ''
}
},
watch: {
isShow(newVal) {
if (newVal) {
this.getDetail()
}else{
this.id = ''
this.fileList = []
this.zuozhengList = []
this.form = {
rukushijian: '',
rukuleixing: '',
pandianleixing: '',
jingbanren: '',
jilurenyuan: '',
baoguanrenyuan: '',
beizhu: '',
zuozhengwenjian: '',
rukutupian:''
}
}
}
},
created() {
this.headers.token = getToken()
},
methods: {
//
beforeUpload(file) {
// if (file.size / 1000 > 500) {
// this.$message({
// type: "warning",
// message: "500kb",
// });
// return false;
// }
},
onSuccess(response, file, fileList) {
console.log('fileList', fileList)
this.fileList = fileList
const arr = []
for (var k of this.fileList) {
arr.push(k?.response?.id)
}
this.form.rukutupian = arr
},
onRemove(file, fileList) {
this.fileList = fileList
const arr = []
for (var k of this.fileList) {
arr.push(k?.response?.id)
}
this.form.rukutupian = arr
},
onError(err, file, fileList) {
this.fileList = fileList
this.$message({
type: 'warning',
message: err
})
},
//
handlePrint() {
//
// this.$message.success('')
this.isShow = false
this.resetForm()
window.open('/admin/print.html?ids=' + this.printArr, '_blank')
},
submit(){
if(this.fileList.length<1){
Message({
type:'warning',
message:'请上传现场实物图'
})
return
}else{
this.form.rukutupian = []
for (var k of this.fileList) {
this.form.rukutupian.push(k?.response?.id)
}
}
save({
...this.form,
zhuangtai:3,
id: this.id,
table_name: this.tableName,
}).then(res => {
this.$message.success('入库成功')
this.$emit('refresh')
this.isShow = false
})
},
//
async getDetail() {
const res = await show({
id: this.id,
table_name: this.tableName
})
this.form = {
rukushijian: res?.rukushijian,
rukuleixing: res?.rukuleixing,
pandianleixing: res?.pandianleixing,
jingbanren: res?.jingbanren,
jilurenyuan: res?.jilurenyuan,
baoguanrenyuan: res?.baoguanrenyuan,
beizhu: res?.beizhu,
zuozhengwenjian: res?.zuozhengwenjian,
rukutupian:res?.rukutupian
}
this.form.id = this.id
this.form.zhuangtai = res.zhuangtai?res.zhuangtai:0
this.mingxiList = []
for (var r of res.id_stocks_item_links_stocks_id_relation) {
const yuanshishuju = JSON.parse(r.yuanshishuju)
yuanshishuju['id'] = r.id
yuanshishuju['stocks_items_id'] = r.stocks_items_id
this.mingxiList.push(yuanshishuju)
}
this.zuozhengList = []
const _lists = res.zuozhengwenjian_upload_details ? res.zuozhengwenjian_upload_details : []
for (var f of _lists) {
this.zuozhengList.push({
name: f?.original_name,
url: f?.url,
response: f
})
}
this.fileList = []
const ruku_lists = res.rukutupian_upload_details ? res.rukutupian_upload_details : []
for (var f of ruku_lists) {
this.fileList.push({
name: f?.original_name,
url: f?.url,
response: f
})
}
},
}
}
</script>
<style scoped>
.step-content {
min-height: 300px;
}
.operation-bar {
display: flex;
justify-content: flex-end;
}
.step-complete {
display: flex;
justify-content: center;
align-items: center;
height: 300px;
}
</style>

@ -1,10 +1,11 @@
<template>
<div>
<div class="button-wrap">
<Button type="primary" @click="editorRuku('','add','采购')"></Button>
<Button type="primary" @click="editorRuku('','add','请示')"></Button>
<Button type="primary" @click="editorRuku('','add','盘点')"></Button>
<Button type="primary" @click="editorRuku('','add','回库')"></Button>
<div class="button-wrap" v-if="roleName=='系统管理员'||isCkName=='仓库管理员'">
<Button type="primary" @click="editorRuku('','add','采购入库')"></Button>
<Button type="primary" @click="editorRuku('','add','请示入库')"></Button>
<Button type="primary" @click="editorRuku('','add','调拨入库')"></Button>
<Button type="primary" @click="editorRuku('','add','盘点入库')"></Button>
<Button type="primary" @click="editorRuku('','add','归还入库')"></Button>
</div>
<div ref="lxHeader">
<lx-header icon="md-apps" text="入库管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
@ -14,6 +15,9 @@
<Select v-model="select.rukuleixing" style="width: 200px;margin-right: 10px;" placeholder="入库类型" clearable>
<Option v-for="item in rukuTypeList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
<Select v-model="select.zhuangtai" style="width: 200px;margin-right: 10px;" placeholder="状态" clearable>
<Option v-for="item in statusList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
<Button type="primary" @click="getindex"></Button>
</div>
</slot>
@ -29,7 +33,7 @@
@pageIndexChange="pageChange"
>
<template v-slot:guanlianjilu>
<!-- <template v-slot:guanlianjilu>
<el-table-column label="关联记录" width="260" header-align="left">
<template slot-scope="scope">
<div v-for="item in rukuTypeList">
@ -40,15 +44,48 @@
</template>
</el-table-column>
</template>
</template> -->
<template v-slot:zhuangtai>
<el-table-column label="状态" width="120" align="center" header-align="left">
<template slot-scope="scope">
<div v-for="item in statusList">
<el-tag :type="item.type" v-if="scope.row.zhuangtai==item.id">
{{ item.value }} {{scope.row.zhuangtai}}
</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column fixed="right" label="操作" width="120" header-align="center">
<el-table-column label="操作" width="240" header-align="center">
<!-- 1 盘点 归还不用发起流程 不用确认入库 -->
<!-- 2 待处理 退回 可编辑 -->
<!-- 3 待处理 可删除 -->
<!-- 4 退回 待处理 可发起流程 -->
<!-- 5 待入库 可确认入库 -->
<!-- 6 已入库 只有查看 -->
<template slot-scope="scope">
<div v-if="scope.row.jingbanren==authName||roleName=='系统管理员'||isCkName=='仓库管理员'">
<Button type="primary" size="small" @click="editorRuku(scope.row.id,'editor',scope.row.rukuleixing)"></Button>
<Poptip transfer confirm title="确认要删除该入库记录?入库明细将一同删除。" @on-ok="deleteRuku(scope.row)">
<Button type="error" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip>
<div v-if="roleName=='系统管理员'||isCkName=='仓库管理员'">
<template v-if="scope.row.zhuangtai===3 || scope.row.zhuangtai===1">
<Button style="margin-right: 10px;" type="primary" size="small"
@click="showRukuDetail(scope.row.id)">查看</Button>
</template>
<template v-else>
<Button v-if="scope.row.zhuangtai===0 || scope.row.zhuangtai===4" style="margin-right: 10px;" type="primary" size="small"
@click="editorRuku(scope.row.id,'editor',scope.row.rukuleixing)">编辑</Button>
<Button v-if="scope.row.zhuangtai===0 || scope.row.zhuangtai===4" style="margin-right: 10px;" type="primary" size="small"
@click="toOaFollow(scope.row.id,scope.row.rukuleixing)">发起流程</Button>
<Button v-if="scope.row.zhuangtai===2" style="margin-right: 10px;" type="primary" size="small"
@click="showRukuDetail(scope.row.id)">确认入库</Button>
<Poptip v-if="scope.row.zhuangtai===0" transfer confirm title="确认要删除该入库记录?入库明细将一同删除。"
@on-ok="deleteRuku(scope.row)">
<Button type="error" size="small" ghost>删除</Button>
</Poptip>
</template>
</div>
</template>
</el-table-column>
@ -56,7 +93,7 @@
</xy-table>
<addRuku ref="addRuku" @refresh="getindex" />
<showRuku ref="showRuku" @refresh="getindex"></showRuku>
<imports ref="imports" :table-name="customForm.tableName" :form-info="form" @refresh="getindex" />
</div>
@ -67,7 +104,12 @@ import {
index,
destroy
} from '@/api/system/baseForm.js'
import addRuku from './component/addRuku.vue'
import addRuku from './component/addRuku.vue'
import showRuku from './component/showRuku.vue'
import {
getOatoken
} from '@/api/contract.js'
import {
Message
} from 'element-ui'
@ -84,28 +126,34 @@ import {
export default {
components: {
addRuku,
imports
imports,
showRuku
},
data() {
return {
authName: '',
roleName: '',
isCkName: '',
wuziguanli_oatoken:'',
loading: false,
select: {
pageSize: 10,
pageIndex: 1,
keyword: '',
rukuleixing: ''
rukuleixing: '',
zhuangtai:''
},
rukuTypeList: [{
id: '采购',
id: '采购入库',
value: '采购入库',
prop: 'caigouhetong'
}, {
id: '请示',
id: '请示入库',
value: '请示入库',
prop: 'qingshiliucheng'
}, {
id: '调拨入库',
value: '调拨入库',
}, {
id: '盘点',
value: '盘点入库'
@ -113,6 +161,27 @@ export default {
id: '回库',
value: '归还入库'
}],
statusList:[{
id:0,
value:'待处理',
type:'info'
},{
id:1,
value:'待办结',
type:'warning'
},{
id:2,
value:'待入库',
type:''
},{
id:3,
value:'已入库',
type:'success'
},{
id:4,
value:'退回',
type:'danger'
}],
// rukuTypeList:{
// purchase:'',
// return:'',
@ -137,7 +206,7 @@ export default {
},
{
label: '入库日期',
width: 180,
width: 120,
prop: 'rukushijian',
align: 'center',
formatter: (cell, data, value) => {
@ -146,31 +215,37 @@ export default {
},
{
label: '入库类型',
width: 180,
width: 120,
prop: 'rukuleixing',
align: 'center'
},
{
label: '关联记录',
width: 240,
prop: 'guanlianjilu',
align: 'left'
},
label: '状态',
width: 120,
prop: 'zhuangtai',
align: 'center'
},
// {
// label: '',
// width: 240,
// prop: 'guanlianjilu',
// align: 'left'
// },
{
label: '经办人',
width: 180,
width: 120,
prop: 'jingbanren',
align: 'center'
},
{
label: '记录人',
width: 180,
width: 120,
prop: 'jilurenyuan',
align: 'center'
},
{
label: '保管人',
width: 180,
width: 120,
prop: 'baoguanrenyuan',
align: 'center'
},
@ -182,7 +257,7 @@ export default {
// },
{
label: '备注',
width: 240,
// width: 240,
prop: 'beizhu',
align: 'left'
}
@ -190,32 +265,11 @@ export default {
}
},
mounted() {
// if(this.$route.path){
// let path = this.$route.path.split("_")[1]
// console.log(path)
// for(var k in this.rukuTypeList){
// if(path==k){
// this.rukuType = this.rukuTypeList[k]
// if(this.rukuType==''||this.rukuType==''||this.rukuType==''){
// let rowname = ''
// rowname = this.rukuType==''? 'caigouhetong':(this.rukuType==''?'qingshiliucheng':(this.rukuType==''?'yingjicaigou':''))
// this.table.unshift( {
// label: "",
// width: 240,
// prop: 'caigouhetong',
// align: 'left',
// customFn: (row) => {
// return ( <div>
// {row[rowname]}
// </div> )
// }
// })
// }
// }
// }
// }
this.getUserName()
this.getindex()
this.getindex()
getOatoken().then(res => {
this.wuziguanli_oatoken = res.oatoken
})
},
methods: {
async getUserName() {
@ -246,7 +300,13 @@ export default {
'key': 'rukuleixing',
'op': 'eq',
'value': this.select.rukuleixing ? this.select.rukuleixing : ''
}
},
{
'key': 'zhuangtai',
'op': 'like',
'value': this.select.zhuangtai ? this.select.zhuangtai : (this.select.zhuangtai===0?0:'')
}
]
})
this.list = res.data
@ -266,6 +326,25 @@ export default {
this.$refs['addRuku'].authName = this.authName
this.$refs['addRuku'].rukuType = rukuleixing
this.$refs['addRuku'].isShow = true
},
//
showRukuDetail(id){
this.$refs['showRuku'].id = id
this.$refs['showRuku'].isShow = true
},
//
toOaFollow(id,type) {
let typeid = ''
const typeObj = JSON.parse(process.env.VUE_APP_OA_URL_TYPE)
console.log("typeObj",typeObj,type)
for (var k in typeObj) {
if (k == type) {
typeid = parseInt(typeObj[k])
}
}
const url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/${typeid}?wuziguanli_oatoken=${this.wuziguanli_oatoken}&username=${this.authName}&link_id=${id}`
const seeBuy = window.open(url, '_blank')
},
deleteRuku(row) {
console.log(row.id)

Loading…
Cancel
Save