lsun 领料出库-数量出库
This commit is contained in:
parent
b9603f1ccc
commit
6d368377d8
|
|
@ -63,6 +63,14 @@ export function getLeaseOutInfo(id) {
|
|||
})
|
||||
}
|
||||
|
||||
// 领料出库-数量出库
|
||||
export function submitNumOut(data) {
|
||||
return request({
|
||||
url: '/material/lease_apply_info/leaseOut',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -767,12 +767,96 @@
|
|||
<el-button @click="open = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 数量出库 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openNum"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="numOutForm"
|
||||
ref="numOutForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- <span style="margin-right: 50px;">
|
||||
待出库数量:{{outNum}}
|
||||
</span>-->
|
||||
<el-form-item label="请输入车牌号" prop="carCode">
|
||||
<el-input v-model="numOutForm.carCode" maxlength="20" />
|
||||
</el-form-item>
|
||||
<span style="margin-right: 50px; color: red"
|
||||
>部分设备出库时,需进行装车,需记录车牌号码</span
|
||||
>
|
||||
<br>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="numOutForm.remark" maxlength="50" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" @click="saveNumOut"
|
||||
>出库</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="outNumList" height="500">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="设备类型"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeModelName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="库存数量"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop="num"-->
|
||||
<!-- :show-overflow-tooltip="true"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="待出库数量"
|
||||
align="center"
|
||||
prop="outNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="已出库数量"
|
||||
align="center"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="出库数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.inputNum"
|
||||
placeholder="请输入出库数量"
|
||||
type="number"
|
||||
@input="checkNum(scope.row)"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getListLeaseApply, getApplyInfo } from "@/api/lease/apply";
|
||||
import { outInfoList, getDetailsByTypeId, submitOut } from "@/api/lease/out";
|
||||
import { outInfoList, getDetailsByTypeId, submitOut,submitNumOut } from "@/api/lease/out";
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
export default {
|
||||
dicts: ["lease_task_status"],
|
||||
|
|
@ -808,6 +892,7 @@ export default {
|
|||
//出库数量
|
||||
getListOutInfo: [],
|
||||
outCodeList: [],
|
||||
outNumList: [], //数量弹窗表格数据
|
||||
maCodeList: [],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
|
|
@ -850,6 +935,13 @@ export default {
|
|||
leaseApplyDetails: [],
|
||||
// 领料任务详情数据
|
||||
leaseApplyData: {},
|
||||
|
||||
openNum: false, //数量弹窗开关
|
||||
numOutForm: {
|
||||
//数量表单-车牌号
|
||||
carCode: '',
|
||||
remark: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -948,7 +1040,31 @@ export default {
|
|||
},
|
||||
|
||||
//数量出库
|
||||
numOut() {},
|
||||
numOut(row) {
|
||||
console.log(row, '数量出库当前行数据--')
|
||||
this.title = '数量出库'
|
||||
this.openNum = true
|
||||
this.resetForm('codeOutForm')
|
||||
this.resetForm('numOutForm')
|
||||
// console.log(row)
|
||||
let obj = {}
|
||||
console.log("row",row)
|
||||
this.$set(obj, 'taskId', row.taskId)
|
||||
this.$set(obj, 'id', row.id)
|
||||
this.$set(obj, 'manageType', 1)
|
||||
this.$set(obj, 'maId', row.maId)
|
||||
this.$set(obj, 'parentId', row.parentId)
|
||||
this.$set(obj, 'typeName', row.typeName)
|
||||
this.$set(obj, 'typeModelName', row.maTypeName)
|
||||
this.$set(obj, 'typeId', row.typeId)
|
||||
this.$set(obj, 'alNum', row.alNum) //已出库数量
|
||||
this.$set(obj, 'outNum', row.outNum) //待出库数量
|
||||
this.$set(obj, 'inputNum', 1) //出库数量
|
||||
this.$set(obj, 'num', row.num) //库存
|
||||
console.log("[obj]",[obj])
|
||||
this.outNumList = [obj]
|
||||
|
||||
},
|
||||
|
||||
//编码出库
|
||||
codeOut(row) {
|
||||
|
|
@ -979,6 +1095,7 @@ export default {
|
|||
resetOutQuery() {},
|
||||
|
||||
saveCodeOut() {
|
||||
console.log(this.maCodeList)
|
||||
let param = { leaseOutDetailsList: this.maCodeList };
|
||||
submitOut(param).then((response) => {
|
||||
this.$modal.msgSuccess("出库成功");
|
||||
|
|
@ -1046,6 +1163,33 @@ export default {
|
|||
`领料出库_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
//数量出库保存
|
||||
saveNumOut() {
|
||||
this.outNumList[0].carCode = this.numOutForm.carCode
|
||||
this.outNumList[0].remark = this.numOutForm.remark
|
||||
this.outNumList[0].leaseType = this.leaseType
|
||||
let param = {leaseOutDetailsList:this.outNumList}
|
||||
console.log(param, '数量出库时参数')
|
||||
submitNumOut(param).then((response) => {
|
||||
this.$modal.msgSuccess('出库成功')
|
||||
this.openNum = false
|
||||
this.handleQueryOutInfo()
|
||||
this.handleQuery()
|
||||
})
|
||||
},
|
||||
|
||||
//输入出库数量
|
||||
checkNum(row) {
|
||||
let maxNum = row.outNum
|
||||
if (row.inputNum <= 1) {
|
||||
row.inputNum = 1
|
||||
}
|
||||
if (row.inputNum > row.outNum ) {
|
||||
row.inputNum = maxNum
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleAllImg(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
|
|
@ -305,6 +305,54 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看全部图片的弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="showAllImg" width="600px" append-to-body>
|
||||
<el-form ref="form" label-width="120px" >
|
||||
<el-form-item label="营业执照">
|
||||
<el-upload
|
||||
class = "upload-demo"
|
||||
action="#"
|
||||
:file-list="businessLicenseListTemp"
|
||||
:show-file-list="true"
|
||||
:auto-upload="false"
|
||||
:key="uploadKey"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg, .pdf"
|
||||
:on-change="handleChangeBusinessList"
|
||||
:class="{ disabled: uploadDisabled }"
|
||||
:on-preview="picturePreview"
|
||||
:on-remove="handleRemoveElectricianImgList"
|
||||
>
|
||||
|
||||
<!-- 文件格式下载,图片格式预览 -->
|
||||
<div slot="file" slot-scope="{file}">
|
||||
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
|
||||
<div v-else class="picture-card-container" >
|
||||
<img class="picture-card" :src="urlTemp" alt="">
|
||||
<p class="file-name">{{ file.name }}</p>
|
||||
</div>
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span v-if="updataIf(file)" class="el-upload-list__item-delete" @click="handleDownload(file)">
|
||||
<i class="el-icon-download" />
|
||||
</span>
|
||||
<span v-else class="el-upload-list__item-preview" @click="picturePreview(file)">
|
||||
<i class="el-icon-zoom-in" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<i class="el-icon-plus avatar-uploader-icon" ></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" v-if="showConfirmButton">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 图片查看弹窗 -->
|
||||
<el-dialog :visible.sync="dialogVisible" width="600px" height="600px" >
|
||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
|
|
@ -349,6 +397,8 @@ export default {
|
|||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showHouse: false,
|
||||
showAllImg: false,
|
||||
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
|
|
@ -381,7 +431,6 @@ export default {
|
|||
businessLicenseFileList:[],
|
||||
businessLicenseListTemp:[],
|
||||
delBusinessFileIdList:[],
|
||||
modelIdTemp:undefined,
|
||||
base64Data:undefined,
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: '',
|
||||
|
|
@ -413,6 +462,7 @@ export default {
|
|||
},
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||
{
|
||||
required:false,
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
|
|
@ -635,9 +685,6 @@ export default {
|
|||
this.delBusinessFileIdList=[];
|
||||
this.businessLicenseListTemp=[];
|
||||
this.businessLicenseFileList=[];
|
||||
const supplierId = row.supplierId;
|
||||
this.modelIdTemp = row.supplierId;
|
||||
|
||||
var id = row.agreementId;
|
||||
getAgreementDetail(id).then((response) => {
|
||||
this.form = response.data;
|
||||
|
|
@ -662,14 +709,42 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
handleAllImg(row){
|
||||
this.reset()
|
||||
this.uploadKey = Date.now();
|
||||
this.delBusinessFileIdList=[];
|
||||
this.businessLicenseListTemp=[];
|
||||
this.businessLicenseFileList=[];
|
||||
|
||||
var id = row.agreementId;
|
||||
getAgreementDetail(id).then((response) => {
|
||||
if(response.data.bmFileInfos!=null){
|
||||
this.businessLicenseListTemp = response.data.bmFileInfos;
|
||||
this.businessLicenseListTemp.forEach(item=>{
|
||||
if(item.name.includes('/')){
|
||||
const fileNameWithTimestamp = item.name.split('/').pop();
|
||||
const parts = fileNameWithTimestamp.split('_');
|
||||
const fileType = item.name.split('.').pop();
|
||||
const mainFileName = parts.slice(0, parts.length - 1).join('_');
|
||||
item.name = mainFileName + '.' +fileType;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.businessLicenseListTemp = [];
|
||||
}
|
||||
this.showHouse = false
|
||||
this.showConfirmButton = false
|
||||
this.showAllImg = true
|
||||
this.title = '查看'
|
||||
})
|
||||
},
|
||||
|
||||
handleView(row){
|
||||
this.reset()
|
||||
this.uploadKey = Date.now();
|
||||
this.delBusinessFileIdList=[];
|
||||
this.businessLicenseListTemp=[];
|
||||
this.businessLicenseFileList=[];
|
||||
const supplierId = row.supplierId;
|
||||
this.modelIdTemp = row.supplierId;
|
||||
|
||||
var id = row.agreementId;
|
||||
getAgreementDetail(id).then((response) => {
|
||||
|
|
@ -695,6 +770,7 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
|
|
@ -765,7 +841,7 @@ export default {
|
|||
console.log('fileTwo',fileTwo)
|
||||
this.businessLicenseListTemp.forEach(item=>{
|
||||
if(item.status=='success'){
|
||||
let objThree = { 'name': item.name, 'url': item.url,'modelId': this.modelIdTemp, 'fileType':4, 'taskType':9};
|
||||
let objThree = { 'name': item.name, 'url': item.url, 'taskType':10};
|
||||
this.businessLicenseFileList.push(objThree);
|
||||
}
|
||||
})
|
||||
|
|
@ -773,7 +849,7 @@ export default {
|
|||
let res = await imgUpLoadThree(fileTwo);
|
||||
if (res.code === 200) {
|
||||
res.data.forEach(item=>{
|
||||
let objTwo = { 'name': item.name, 'url': item.url,'modelId': this.modelIdTemp, 'fileType':4, 'taskType':9};
|
||||
let objTwo = { 'name': item.name, 'url': item.url, 'taskType':10};
|
||||
this.businessLicenseFileList.push(objTwo);
|
||||
})
|
||||
} else {
|
||||
|
|
@ -842,6 +918,7 @@ export default {
|
|||
// 取消按钮
|
||||
cancel() {
|
||||
this.showHouse = false;
|
||||
this.showAllImg = false;
|
||||
this.delBusinessFileIdList=[];
|
||||
this.businessLicenseListTemp=[]
|
||||
this.businessLicenseFileList=[];
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
<el-table-column
|
||||
label="物资类型"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
prop="itemType"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
Loading…
Reference in New Issue