佐证文件:
@@ -167,8 +178,10 @@
-
-
+
+
+
+
@@ -190,7 +203,9 @@
+ placeholder="请选择物资编码" style="width: 300px;">
+
+
+
+
+
+
+ 查询
+
+
+
+
+ @importdata='getimportData'>
+
+
@@ -323,7 +351,8 @@
import {
save,
index,
- show
+ show,
+ destroy
} from "@/api/system/baseForm.js"
import {
index as getContract,
@@ -338,10 +367,12 @@
import {
index as fieldIndex
} from "@/api/system/customFormField";
- import {getToken} from "@/utils/auth";
+ import {getToken} from "@/utils/auth";
+ import addMater from "@/views/materialfile/component/addMater.vue"
export default {
components: {
- detailContract,
+ detailContract,
+ addMater,
imports
},
data() {
@@ -372,7 +403,8 @@
pandianList:[{label:'正常盘点',value:'正常盘点'},{label:'外部调拨',value:'外部调拨'},{label:'其他',value:'其他'}],
form: {
caigouhetong: '',
- qingshiliucheng:"",
+ qingshiliucheng:"",
+ yingjicaigou:'',
gudingzichanbianhao: '',
rukushijian: '',
// caigouhetong:'',
@@ -396,10 +428,10 @@
required: true,
message: '请选择入库时间'
}],
- pandianleixing: [{
- required: true,
- message: '请选择盘点类型'
- }],
+ // pandianleixing: [{
+ // required: true,
+ // message: '请选择盘点类型'
+ // }],
jingbanren: [{
required: true,
message: '请填写经办人'
@@ -608,7 +640,58 @@
}
}, '查看详情')
}
- }],
+ }],
+ //应急采购请示流程
+ isShowYj:false,
+ yjList: [],
+ yjkeyword: '',
+ yjPageIndex: 1,
+ yjTotal: 0,
+ editYj: '',
+ yjColumns: [{
+ width: 60,
+ _isChecked: false,
+ key: "isSelect",
+ resizable: true,
+ render: (h, params) => {
+ return h('div', [
+ h('Radio', {
+ props: {
+ value: params.row.isSelect
+ },
+ on: {
+ 'on-change': (e) => {
+ this.yjList.forEach((items) => {
+ this.$set(items, 'isSelect', false)
+ });
+ this.yjList[params.index].isSelect = e;
+ }
+ }
+ })
+ ])
+ }
+ }, {
+ title: '名称',
+ key: 'title',
+ }, {
+ title: '查看',
+ key: '',
+ width: 100,
+ render: (h, params) => {
+ return h('span', {
+ style: {
+ color: '#0077CC',
+ cursor: 'pointer'
+ },
+ on: {
+ 'click': (e) => {
+ this.toYjFollow(params.row.belongs_id)
+ // @click=","
+ }
+ }
+ }, '查看详情')
+ }
+ }]
}
},
created() {
@@ -708,13 +791,11 @@
// 获取请示流程
async getQs() {
let res = await getQingShi({
+ // table:'qingshiruku',
table:'qingshi',
page:this.qsPageIndex,
status:1,
keyword:this.qskeyword
- // page_size: 10,
- // page: this.htPageIndex,
- // keyword: this.htkeyword,
})
for (var m of res.data.flow.data) {
m.isSelect = false
@@ -753,6 +834,56 @@
async toQsFollow(id){
// let res = await getOatoken()
+ let url =
+ `${process.env.VUE_APP_OA_URL}/admin/flow/view/${id}?wuziguanli_oatoken=${this.wuziguanli_oatoken}`
+ console.log("url",url)
+ let seeBuy = window.open(url, 'seeBuy','location=0')
+ },
+ // 获取应急采购请示流程
+ async getYj() {
+ let res = await getQingShi({
+ table:'yingjicaigou',
+ page:this.yjPageIndex,
+ status:1,
+ keyword:this.yjkeyword
+ })
+ for (var m of res.data.flow.data) {
+ m.isSelect = false
+ }
+ this.yjList = res.data.flow.data
+ this.yjTotal = res.data.flow.total
+ // this.hetongoptions = res.data
+ },
+ yjCancel() {
+ this.yjList.forEach((items) => {
+ this.$set(items, 'isSelect', false)
+ });
+ this.form.yingjicaigou = this.editYj
+ },
+ yjSelect(e) {
+ this.yjList.forEach((items) => {
+ this.$set(items, 'isSelect', false)
+ if (items.id == e.id) {
+ this.$set(items, 'isSelect', true)
+ }
+ });
+
+ },
+ yjComfirm() {
+ this.yjList.forEach((items) => {
+ if (items.isSelect == true) {
+ this.form.yingjicaigou = items.title
+ this.editYj = items.title
+ }
+ });
+ },
+ yjPageChange(e) {
+ this.yjPageIndex = e
+ this.getYj()
+ },
+ async toYjFollow(id){
+ // let res = await getOatoken()
+
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/view/${id}?wuziguanli_oatoken=${this.wuziguanli_oatoken}`
console.log("url",url)
@@ -812,6 +943,46 @@
this.mingxiObj = this.mingxiList[index]
this.mingxiIndex = index + 1 // 为0时!=‘’为false
this.isShowMingxi = true
+ },
+ // 删除明细记录
+ async delMingxiList(index,row){
+
+ let isDel = false
+ let isDels = false
+ let id = row.id
+ let stocks_items_id = row.stocks_items_id
+ if(row.id){
+ await destroy({
+ id:id,
+ table_name:'stocks_item_links'
+ }).then(res=>{
+ isDel = true
+ })
+ await destroy({
+ id:stocks_items_id,
+ table_name:'stocks_items'
+ }).then(res=>{
+ isDels = true
+ })
+ if(isDel && isDels){
+ Message({
+ type: 'success',
+ message: '删除成功'
+ })
+ this.mingxiList.splice(index, 1)
+ }else{
+ Message({
+ type: 'warning',
+ message: '删除失败'
+ })
+ }
+ }else{
+ Message({
+ type: 'success',
+ message: '删除成功'
+ })
+ this.mingxiList.splice(index, 1)
+ }
},
showWuzi(type) {
this.isShowWuzi = true
@@ -823,6 +994,22 @@
} else {
this.getWuzi()
}
+ },
+ // 新增物资档案
+ showMater(){
+ this.$refs['addMater'].isShow = true
+ this.$refs['addMater'].type = 'add'
+ this.$refs['addMater'].webType = 'insert'
+ },
+ insertMingxi(e){
+ console.log("e",e)
+ this.mingxiObj.wuzibianma = e.wuzibianma
+ this.mingxiObj.zichanmingcheng = e.zichanmingcheng
+ this.mingxiObj.wuzileixing = e.wuzileixing
+ this.mingxiObj.guigexinghao = e.guigexinghao
+ this.mingxiObj.jiliangdanwei = e.jiliangdanwei
+ this.mingxiObj.fenlei = e.fenlei
+ this.mingxiObj.rukupici = '第一批'
},
getList() {
if (this.form.rukuleixing == '回库') {
@@ -995,10 +1182,15 @@
this.editQs = res?.qingshiliucheng
this.mingxiList = []
for(var r of res.id_stocks_item_links_stocks_id_relation){
- this.mingxiList.push(JSON.parse(r.yuanshishuju))
+ let yuanshishuju = JSON.parse(r.yuanshishuju)
+ yuanshishuju['id'] = r.id
+ yuanshishuju['stocks_items_id'] = r.stocks_items_id
+ this.mingxiList.push(yuanshishuju)
}
+ console.log("this.mingxiList",this.mingxiList)
this.fileList = []
- for(var f of res.zuozhengwenjian_upload_details){
+ let _lists = res.zuozhengwenjian_upload_details?res.zuozhengwenjian_upload_details:[]
+ for(var f of _lists){
this.fileList.push({
name: f?.original_name,
url: f?.url,
@@ -1103,6 +1295,9 @@
}
if (this.rukuType == '请示') {
this.getQs()
+ }
+ if (this.rukuType == '应急采购') {
+ this.getYj()
}
if (this.type === 'editor') {
this.getDetail()
diff --git a/src/views/stocks/index.vue b/src/views/stocks/index.vue
index 0e94229..9f5b91b 100644
--- a/src/views/stocks/index.vue
+++ b/src/views/stocks/index.vue
@@ -24,8 +24,9 @@
-
+
+
@@ -74,6 +75,7 @@
return {
authName:'',
roleName:'',
+ isCkName:'',
loading:false,
select: {
pageSize: 10,
@@ -87,7 +89,8 @@
check:'盘点',
data:"数据校对",
mock:'模拟盘点',
- ask:'请示'
+ ask:'请示',
+ yingji:'应急采购'
},
customForm: {
customFormId: "",
@@ -101,12 +104,6 @@
type: 'index',
fixed: 'left',
width:80
- },
- {
- label: "固定资产编号",
- width: 180,
- prop: 'gudingzichanbianhao',
- align: 'center'
},
{
label: "入库时间",
@@ -140,6 +137,12 @@
width: 180,
prop: 'baoguanrenyuan',
align: 'center'
+ },
+ {
+ label: "固定资产编号",
+ width: 180,
+ prop: 'gudingzichanbianhao',
+ align: 'center'
},
{
label: "备注",
@@ -157,6 +160,9 @@
if(k.name=='系统管理员'){
this.roleName = k.name
}
+ if(k.name=='仓库管理员'){
+ this.isCkName = '仓库管理员'
+ }
}
this.authName = res.name
}).catch(error => {})
@@ -201,7 +207,8 @@
// return
destroy({
id: row.id,
- table_name: this.customForm.tableName
+ table_name: this.customForm.tableName,
+ destroy_relation:['id_stocks_item_links_stocks_id_relation','id_stocks_items_stocks_id_relation'],
}).then(res => {
Message({
type: 'success',
@@ -218,6 +225,21 @@
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 (
+ {row[rowname]}
+
)
+ }
+ })
+ }
}
}
}