|
|
|
|
@ -28,7 +28,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- 确认入库 -->
|
|
|
|
|
<el-upload v-if="form.zhuangtai===2" ref="upload" list-type="text" class="upload-demo" :action="action" multiple :headers="headers"
|
|
|
|
|
<el-upload v-if="form.zhuangtai===2 || canEditAttachments" ref="upload" list-type="text" class="upload-demo" :action="action" multiple :headers="headers"
|
|
|
|
|
:before-upload="beforeUpload" :on-success="onSuccess" :on-error="onError" :on-remove="onRemove" :on-preview="onPreview"
|
|
|
|
|
:file-list="fileList" :auto-upload="true">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
入库记录单
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-upload v-if="form.zhuangtai===2" ref="uploadRukujiludan" list-type="text" class="upload-demo" :action="action" multiple :headers="headers"
|
|
|
|
|
<el-upload v-if="form.zhuangtai===2 || canEditAttachments" ref="uploadRukujiludan" list-type="text" class="upload-demo" :action="action" multiple :headers="headers"
|
|
|
|
|
:before-upload="beforeUpload" :on-success="onSuccessRukujiludan" :on-error="onErrorRukujiludan" :on-remove="onRemoveRukujiludan" :on-preview="onPreview"
|
|
|
|
|
:file-list="rukujiludanFileList" :auto-upload="true">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
@ -71,8 +71,9 @@
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:footerContent>
|
|
|
|
|
<Button @click="isShow=false">关闭</Button>
|
|
|
|
|
<Button type="primary" v-if="form.zhuangtai===2" @click="openPrint">打印</Button>
|
|
|
|
|
<Button type="primary" v-if="form.zhuangtai===2 || canEditAttachments" @click="openPrint">打印</Button>
|
|
|
|
|
<Button type="primary" v-if="form.zhuangtai===2" @click="submit">入库</Button>
|
|
|
|
|
<Button type="primary" v-if="canEditAttachments" @click="saveAttachments">保存</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
<printRuku :visible.sync="printDialogVisible" :print-form="printForm" :print-mingxi="mingxiList" />
|
|
|
|
|
@ -100,6 +101,15 @@
|
|
|
|
|
import printRuku from './printRuku.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components: { printRuku },
|
|
|
|
|
props: {
|
|
|
|
|
roleName: { type: String, default: '' },
|
|
|
|
|
isCkName: { type: String, default: '' }
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
canEditAttachments() {
|
|
|
|
|
return this.form.zhuangtai === 3 && (this.roleName === '系统管理员' || this.isCkName === '仓库管理员')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
id: '',
|
|
|
|
|
@ -352,6 +362,25 @@
|
|
|
|
|
this.isShow = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
saveAttachments() {
|
|
|
|
|
const rukutupianArr = []
|
|
|
|
|
for (var k of this.fileList) {
|
|
|
|
|
rukutupianArr.push(k?.response?.id)
|
|
|
|
|
}
|
|
|
|
|
const rukujiludanArr = []
|
|
|
|
|
for (var k of this.rukujiludanFileList) {
|
|
|
|
|
rukujiludanArr.push(k?.response?.id)
|
|
|
|
|
}
|
|
|
|
|
saveStock({
|
|
|
|
|
id: this.id,
|
|
|
|
|
rukutupian: rukutupianArr,
|
|
|
|
|
rukujiludan: rukujiludanArr
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
this.isShow = false
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await showStock({
|
|
|
|
|
|