|
|
|
@ -515,36 +515,38 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="returnModelVisible" title="退料" width="25%">
|
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" label-width="80px" :rules="returnModelFormRules">
|
|
|
|
|
<el-form-item label="计划编号" >
|
|
|
|
|
<el-form ref="returnModelForm" :model="returnModelForm" :rules="returnModelFormRules" label-width="80px">
|
|
|
|
|
<el-form-item label="计划编号">
|
|
|
|
|
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="明细编号" >
|
|
|
|
|
<el-form-item label="明细编号">
|
|
|
|
|
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="成品" >
|
|
|
|
|
<el-form-item label="成品">
|
|
|
|
|
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料条码" >
|
|
|
|
|
<el-input placeholder="请输入内容" v-model="returnModelForm.materialBarcode" class="input-with-select" @blur="setReturnModelForm">
|
|
|
|
|
<el-form-item label="物料条码">
|
|
|
|
|
<el-input v-model="returnModelForm.materialBarcode" class="input-with-select" placeholder="请输入内容"
|
|
|
|
|
@blur="setReturnModelForm">
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="仓库" >
|
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" placeholder="请选择仓库" :disabled="!returnModelForm.materialBarcode">
|
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in WarehousesList"></el-option>
|
|
|
|
|
<el-form-item label="仓库">
|
|
|
|
|
<el-select v-model="returnModelForm.warehouseId" :disabled="!returnModelForm.materialBarcode"
|
|
|
|
|
placeholder="请选择仓库">
|
|
|
|
|
<el-option v-for="i in WarehousesList" :label="i.label" :key="i.value" :value="i.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="数量" >
|
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1" ></el-input-number>
|
|
|
|
|
<el-form-item label="数量">
|
|
|
|
|
<el-input-number v-model="returnModelForm.planAmount" :min="1" controls-position="right"></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="退库类型" prop="taskType">
|
|
|
|
|
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型">
|
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in dict.type.wms_raw_return_task_type"></el-option>
|
|
|
|
|
<el-option v-for="i in dict.type.wms_raw_return_task_type" :label="i.label" :key="i.value" :value="i.value"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="申请原因" >
|
|
|
|
|
<el-input type="textarea" v-model="returnModelForm.applyReason" autocomplete="off"></el-input>
|
|
|
|
|
<el-form-item label="申请原因">
|
|
|
|
|
<el-input v-model="returnModelForm.applyReason" autocomplete="off" type="textarea"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button @click="returnModelVisible = false">取 消</el-button>
|
|
|
|
@ -553,6 +555,65 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="SOPModel"
|
|
|
|
|
title="上传图纸"
|
|
|
|
|
width="30%"
|
|
|
|
|
@before-close="blueprintModel = false">
|
|
|
|
|
<el-upload
|
|
|
|
|
ref="drawingUpload"
|
|
|
|
|
:auto-upload="true"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
:headers="headers"
|
|
|
|
|
:limit="0"
|
|
|
|
|
action="uploadImgUrl"
|
|
|
|
|
list-type="picture-card"
|
|
|
|
|
single
|
|
|
|
|
>
|
|
|
|
|
<i slot="default" class="el-icon-plus"></i>
|
|
|
|
|
<div slot="file" slot-scope="{file}">
|
|
|
|
|
<img
|
|
|
|
|
v-if="isAssetTypeAnImage(file.name)"
|
|
|
|
|
:alt="file.name"
|
|
|
|
|
:src="file.url" class="el-upload-list__item-thumbnail"
|
|
|
|
|
>
|
|
|
|
|
<span v-else>{{ file.name }}</span>
|
|
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
|
|
<span
|
|
|
|
|
v-if="isAssetTypeAnImage(file.name)"
|
|
|
|
|
class="el-upload-list__item-preview"
|
|
|
|
|
@click="handlePictureCardPreview(file)"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-zoom-in"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
class="el-upload-list__item-delete"
|
|
|
|
|
@click="handleDownload(file)"
|
|
|
|
|
>
|
|
|
|
|
<i class="el-icon-download"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="SOPModel = false">确 定</el-button>
|
|
|
|
|
<el-button @click="SOPModel = false">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="pictureDetailModel"
|
|
|
|
|
append-to-body
|
|
|
|
|
title="图纸预览"
|
|
|
|
|
width="800"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
:src="dialogImageUrl"
|
|
|
|
|
style="display: block; max-width: 100%; margin: 0 auto"
|
|
|
|
|
/>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -570,20 +631,66 @@ import {
|
|
|
|
|
firstFloorProduceInstock,
|
|
|
|
|
scanMaterial2Confirm, applyRawReturn
|
|
|
|
|
} from '@/api/board'
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
|
export default {
|
|
|
|
|
name: 'Board1',
|
|
|
|
|
dicts: ['mes_plan_detail_status','wms_raw_return_task_type'],
|
|
|
|
|
dicts: ['mes_plan_detail_status', 'wms_raw_return_task_type'],
|
|
|
|
|
components: {
|
|
|
|
|
Chart,
|
|
|
|
|
PrintPage
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
fileList: [
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '会议纪要 0825_20240417143926A014.docx',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/会议纪要 0825_20240417143926A014.docx'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '会议纪要 0825_20240417143926A014.docx',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/会议纪要 0825_20240417143926A014.docx'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '会议纪要 0825_20240417143926A014.docx',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/会议纪要 0825_20240417143926A014.docx'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Snipaste_2023-09-04_08-16-59.png',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/Snipaste_2023-09-04_08-16-59_20240417142903A013.png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '会议纪要 0825_20240417143926A014.docx',
|
|
|
|
|
url: 'http://175.27.215.92:9665/statics/2024/04/17/会议纪要 0825_20240417143926A014.docx'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
SOPModel: true,
|
|
|
|
|
pictureDetailModel: false,
|
|
|
|
|
dialogImageUrl: '',
|
|
|
|
|
returnModelVisible: false,
|
|
|
|
|
returnModelForm:{},
|
|
|
|
|
WarehousesList:[],
|
|
|
|
|
returnModelForm: {},
|
|
|
|
|
WarehousesList: [],
|
|
|
|
|
PrintData: {},
|
|
|
|
|
printModel: false,
|
|
|
|
|
nowNum1: 1,
|
|
|
|
@ -631,9 +738,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
returnModelFormRules: {
|
|
|
|
|
taskType: [
|
|
|
|
|
{ required: true, message: '请选择退库类型', trigger: 'change' }
|
|
|
|
|
{required: true, message: '请选择退库类型', trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
headers: {
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1108,31 +1218,31 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
returnMaterial(e) {
|
|
|
|
|
this.returnModelVisible = true
|
|
|
|
|
this.returnModelForm = {materialName:this.nowMaterial,...e.row}
|
|
|
|
|
this.returnModelForm = {materialName: this.nowMaterial, ...e.row}
|
|
|
|
|
},
|
|
|
|
|
setReturnModelForm(){
|
|
|
|
|
setReturnModelForm() {
|
|
|
|
|
getWarehouses({
|
|
|
|
|
warehouseFloor:1,
|
|
|
|
|
materialBarcode:this.returnModelForm.materialBarcode
|
|
|
|
|
}).then(e=>{
|
|
|
|
|
this.WarehousesList = e.data.map(v=>{
|
|
|
|
|
warehouseFloor: 1,
|
|
|
|
|
materialBarcode: this.returnModelForm.materialBarcode
|
|
|
|
|
}).then(e => {
|
|
|
|
|
this.WarehousesList = e.data.map(v => {
|
|
|
|
|
return {
|
|
|
|
|
label:v.warehouseName,
|
|
|
|
|
value:v.warehouseId,
|
|
|
|
|
label: v.warehouseName,
|
|
|
|
|
value: v.warehouseId,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
returnModelConfirm(){
|
|
|
|
|
returnModelConfirm() {
|
|
|
|
|
this.$refs.returnModelForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
let data = {}
|
|
|
|
|
let keys = ['warehouseId','planCode','planDetailCode','productId','materialBarcode','planAmount','taskType','applyReason']
|
|
|
|
|
keys.forEach(v=>{
|
|
|
|
|
let keys = ['warehouseId', 'planCode', 'planDetailCode', 'productId', 'materialBarcode', 'planAmount', 'taskType', 'applyReason']
|
|
|
|
|
keys.forEach(v => {
|
|
|
|
|
data[v] = this.returnModelForm[v]
|
|
|
|
|
})
|
|
|
|
|
applyRawReturn(data).then(v=>{
|
|
|
|
|
if(v.code === 200){
|
|
|
|
|
applyRawReturn(data).then(v => {
|
|
|
|
|
if (v.code === 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '退库成功',
|
|
|
|
|
type: 'success'
|
|
|
|
@ -1144,7 +1254,22 @@ export default {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//查看图纸预览
|
|
|
|
|
handlePictureCardPreview(file) {
|
|
|
|
|
this.dialogImageUrl = file.url;
|
|
|
|
|
this.pictureDetailModel = true;
|
|
|
|
|
},
|
|
|
|
|
//图纸下载
|
|
|
|
|
async handleDownload(file) {
|
|
|
|
|
this.fileDownload(file)
|
|
|
|
|
},
|
|
|
|
|
isAssetTypeAnImage(ext) {
|
|
|
|
|
let suffix = ext.lastIndexOf(".");
|
|
|
|
|
let name = ext.substr(suffix + 1);
|
|
|
|
|
return ['png', 'jpg', 'jpeg'].includes(name.toLowerCase())
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1260,4 +1385,8 @@ export default {
|
|
|
|
|
/deep/ .dialog .el-dialog__body {
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ .el-upload {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|