问题修改

dev-scheduling
zhangdi 3 weeks ago
parent 1c7a946b4f
commit 5a15020e04
  1. 20
      src/api/basicData/bsPlanAssignSteerModify.js
  2. 22
      src/api/orderManagement/urgentUphold.js
  3. 1
      src/views/a-template/table.vue
  4. 123
      src/views/basicData/bsPlanAssignSteerModify/addEditDialog.vue
  5. 26
      src/views/basicData/bsPlanAssignSteerModify/checkDialog.vue
  6. 41
      src/views/basicData/bsPlanAssignSteerModify/index.vue
  7. 114
      src/views/inboundOutboundManagement/glassCakeOutbound/components/outboundDialog.vue
  8. 6
      src/views/inboundOutboundManagement/glassCakeOutbound/index.vue
  9. 194
      src/views/inboundOutboundManagement/graphiteMoldOutbound/components/outboundDialog.vue
  10. 14
      src/views/inboundOutboundManagement/graphiteMoldOutbound/index.vue
  11. 2
      src/views/logisticsManagement/logisticsDistribution.vue
  12. 307
      src/views/orderManagement/urgentUphold.vue
  13. 1
      src/views/statisticalAnalysis/warehouseAnalysis/inOutBoundReport.vue

@ -44,7 +44,7 @@ export const submitApproval = (data) => {
return request({
url: '/blade-desk/quality/planAssignSteerModify/submitApproval',
method: 'post',
data: data
params: data
});
};
@ -54,4 +54,22 @@ export const auditHistory = (id) => {
url: '/blade-desk/quality/planAssignSteerModify/auditHistory/' + id,
method: 'get',
});
};
// 查询详情
export const detail = (params) => {
return request({
url: '/blade-desk/quality/planAssignSteerModify/detail',
method: 'get',
params: params
});
};
// 审批
export const audit = (data) => {
return request({
url: '/blade-desk/quality/planAssignSteerModify/audit',
method: 'post',
data: data
});
};

@ -0,0 +1,22 @@
import request from '@/axios';
//列表接口
export const getList = (current, size, params) => {
return request({
url: '/blade-desk/BA/UrgentPart/page',
method: 'get',
params: {
...params,
current,
size,
},
});
};
// 作废
export const voidRecords = (data) => {
return request({
url: '/blade-desk/BA/UrgentPart/voidRecords',
method: 'post',
data: data,
});
};

@ -79,6 +79,7 @@ export default {
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
searchLabelWidth:'auto',
align: 'center',
column: [
{

@ -2,13 +2,13 @@
<el-dialog :title="title" append-to-body :modelValue="openShow" width="60%" @close="closeDialog">
<el-form ref="form" :model="formData" :rules="rules" label-width="90px" class="vd-form-row">
<el-row>
<el-col :span="8">
<el-col :span="8" v-if="title == '修改'">
<el-form-item label="申请时间:" prop="createTime">
<el-input v-model="formData.createTime" type="String" disabled /> </el-form-item
></el-col>
<el-col :span="8"
><el-form-item label="申请人:" prop="createMan">
<el-input v-model="formData.createMan" type="String" disabled /> </el-form-item
><el-form-item label="申请人:" prop="createManName">
<el-input v-model="formData.createManName" type="String" disabled /> </el-form-item
></el-col>
<el-col :span="8">
<el-form-item label="工艺能力:" prop="platingId">
@ -30,7 +30,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="16">
<el-form-item label="备注:">
<el-input v-model="formData.pasmMemo" type="textarea" style="width: 99%" />
</el-form-item>
@ -38,13 +38,6 @@
</el-row>
<el-row>
<el-form-item label="附件:">
<!-- <vd-upload
ref="docUpload"
:data="{ theId: formData.trId, theTag: 'PlanAssignSteer', subTag: 'doc' }"
:auto-upload="true"
:size="20"
except="exe"
/> -->
<el-upload
class="upload-demo"
action="/api/blade-resource/oss/endpoint/put-file-attach"
@ -77,7 +70,25 @@
<template #header>
<span><i style="color: red">*</i>供应商</span>
</template>
<template #default="{ row }"> </template>
<template #default="{ row }">
<jhSelect
v-model="row.oemId"
placeholder="请搜索选择"
api-url="/blade-desk/BA/Oem/list"
echo-api="/blade-desk/BA/Oem/list"
echoParamsKey="id"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="ocName"
value-key="id"
search-key="id"
:debounce-time="500"
style="width: 60%"
:title="title"
/>
</template>
</el-table-column>
<el-table-column prop="assignScale" align="center" label="分派比例(%)">
<template #header>
@ -92,14 +103,15 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button type="primary" @click="submit" :loading="submitLoading"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import { getAbility } from '@/api/basicData/workCenter';
import { update,save } from '@/api/basicData/bsPlanAssignSteerModify';
import { update, save, detail } from '@/api/basicData/bsPlanAssignSteerModify';
import { mapGetters } from 'vuex';
export default {
props: {
showDialog: {
@ -116,6 +128,9 @@ export default {
},
moldAddMore: { type: Boolean, default: true },
},
computed: {
...mapGetters(['userInfo']),
},
data() {
return {
openShow: false,
@ -123,6 +138,7 @@ export default {
platingId: null,
pasmMemo: null,
modifyLst: [],
attachment: '',
},
rules: {
platingId: [{ required: true, message: '请选择工艺能力', trigger: 'blur' }],
@ -151,16 +167,38 @@ export default {
formError: '', //
abilityList: [],
fileList: [],
submitLoading: false,
};
},
mounted() {
this.openShow = this.showDialog;
this.getAbilityData();
if(this.title=='修改'){
this.formData = this.rowItem
if (this.title == '修改') {
this.formData = this.rowItem;
let query_ = {
pasmId: this.rowItem ? this.rowItem.id : '',
caId: this.formData.platingId,
};
this.detailFn(query_,'details');
} else {
this.formData.createManName = this.userInfo.userName;
this.formData.createMan = this.userInfo.userId;
}
},
methods: {
detailFn(query, type) {
detail(query).then(res => {
if (type == 'details') {
this.formData = res.data.data;
this.formData.platingId = this.formData.platingId + '';
}else{
this.formData.modifyLst = res.data.data.modifyLst;
}
console.log(res.data.data, 'data');
});
},
getAbilityData() {
getAbility().then(res => {
this.abilityList = res.data.data;
@ -168,35 +206,23 @@ export default {
},
//
bsCraftAbilityChange(idList, item) {
this.query(idList);
let query = {
caId: idList,
};
this.detailFn(query);
},
query(caId) {
// this.$ajax.post('bsPlanAssignSteerModify/queryData/', { 'pasmId': this.trId, 'caId': caId }).then((res) => {
// if (res.code === 0) {
// const { modify, modifyLst } = res.data;
// if (modify != null) {
// this.formData = modify;
// this.bsCraftAbilityOption = [modify.platingId];
// this.docUploadInit();
// }
// if (modifyLst != null) {
// this.fromDataDetails = modifyLst;
// }
// }
// });
selectChange(list, row) {
row._select = !row._select;
},
// push modifyLst
addTable() {
this.formData.modifyLst.push({
_select: false, //
wcId: '', // ID
batchNo: '', // /
preserveContent: '', //
});
},
//
delTable() {
delTable(row) {
this.formData.modifyLst = this.formData.modifyLst.filter(row => !row._select);
},
handleRemove(file, fileList) {
@ -205,7 +231,7 @@ export default {
handleSuccess(response, file, fileList) {
console.log(response.data, 'response.data.link');
// this.ruleForm.attachId = response.data.attachId;
this.formData.attachment = JSON.stringify(response.data);
this.fileList.push(response.data);
},
handleExceed(files, fileList) {
@ -219,9 +245,28 @@ export default {
submit() {
this.$refs.form.validate(async valid => {
if (valid) {
let params = {
...this.formData,
};
this.submitLoading = true;
if (this.title == '新增') {
save(this.formData)
.then(res => {
this.$message.success('保存成功');
this.submitLoading = false;
this.closeDialog(true);
})
.catch(() => {
this.submitLoading = false;
});
} else {
update(this.formData)
.then(res => {
this.$message.success('保存成功');
this.submitLoading = false;
this.closeDialog(true);
})
.catch(() => {
this.submitLoading = false;
});
}
}
});
},

@ -11,7 +11,7 @@
</el-dialog>
</template>
<script>
import { submitApproval } from '@/api/basicData/bsPlanAssignSteerModify';
import { audit } from '@/api/basicData/bsPlanAssignSteerModify';
export default {
props: {
showDialog: {
@ -37,8 +37,8 @@ export default {
span: 24,
type: 'radio',
dicData: [
{ label: '通过', value: 0 },
{ label: '不通过', value: 1 },
{ label: '通过', value: 1 },
{ label: '不通过', value: 2 },
],
rules: [{ required: true, message: '请选择', trigger: 'blur' }],
},
@ -63,16 +63,16 @@ export default {
submit() {
this.$refs.form.validate(async valid => {
if (valid) {
// let params = {
// id: this.$route.query.id,
// approvalStatus: '',
// };
// submitApproval(params).then((res) => {
// if (res.code == 200) {
// this.$message.success('');
// this.closeDialog();
// }
// });
let params = {
// ...this.form,
id: this.rowItem.id,
result: this.form.result,
remark: this.form.remark,
};
audit(params).then(res => {
this.$message.success('操作成功');
this.closeDialog();
});
}
});
},

@ -15,23 +15,28 @@
@on-load="onLoad"
>
<template #menu-left>
<el-button type="primary" @click="addFn()">新增</el-button>
<el-button type="primary" @click="addFn()" v-if="permission.bsPlanAssignSteerModify_add">新增</el-button>
</template>
<template #menu-right> </template>
<template #menu="{ row }">
<el-button type="text" v-if="permission.assignConfig_record" @click="recordFn(scope.row)"
<template #menu="scope">
<el-button type="text" @click="recordFn(scope.row)" v-if="permission.bsPlanAssignSteerModify_record"
>记录</el-button
>
<el-button
v-if="scope.row.approvalStatus == 0"
v-if="scope.row.approvalStatus == 0&&permission.bsPlanAssignSteerModify_update"
type="text"
@click="addEdit(scope.row.pasmId)"
@click="editFn(scope.row)"
>修改</el-button
>
<el-button v-if="scope.row.status == 0" type="text" @click="sendApprovalFn(scope.row)"
<el-button v-if="scope.row.approvalStatus == 0&&permission.bsPlanAssignSteerModify_send_check" type="text" @click="sendApprovalFn(scope.row)"
>发送审批</el-button
>
<el-button v-if="scope.row.approvalStatus == 0" type="text" @click="delRow(scope.row)"
<el-button v-if="scope.row.approvalStatus == 1&&permission.bsPlanAssignSteerModify_check1" type="text" @click="approvalFn(scope.row)"
>审批</el-button
>
<el-button v-if="scope.row.approvalStatus == 4&&permission.bsPlanAssignSteerModify_check2" type="text" @click="approvalFn(scope.row)"
>审批</el-button>
<el-button v-if="scope.row.approvalStatus == 0&&permission.bsPlanAssignSteerModify_del" type="text" @click="delRow(scope.row)"
>删除
</el-button>
</template>
@ -41,6 +46,7 @@
v-if="openShow"
:showDialog="openShow"
:title="title"
:rowItem="rowItem"
@closeDialog="closeDialog"
></addEditDialog>
<!-- 审核 -->
@ -212,23 +218,30 @@ export default {
},
//
editFn(row) {
row.platingId = row.platingId+''
this.rowItem = row;
this.openShow = true;
this.title = '修改';
},
//
approvalFn(row) {
this.checkShow = true;
this.rowItem = row;
},
sendApprovalFn(row) {
this.$confirm('确定将数据发送审批?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// submitApproval({ id: row.id }).then(res => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
// });
submitApproval({ id: row.id }).then(res => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
});
},
recordFn(row) {

@ -16,6 +16,34 @@
></el-input>
<el-button type="danger" @click="delFn" style="float: right">删除</el-button>
</div>
<el-form
ref="ruleFormRef"
style="max-width: 300px"
:model="ruleForm"
:rules="rules"
label-width="auto"
>
<el-form-item label="领用人" prop="picker">
<jhSelect
v-model="ruleForm.picker"
placeholder="请搜索选择"
api-url="/blade-system/user/page"
echo-api="/blade-system/user/page"
echoParamsKey="ids"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="realName"
value-key="id"
search-key="realName"
:debounce-time="500"
@change="projectHeadChange"
:title="title"
:disabled="isDetail"
/>
</el-form-item>
</el-form>
<avue-crud
:option="option"
@ -36,8 +64,12 @@
@cell-click="cellClick"
>
<template #goodsCode="scope">
<el-select v-model="scope.row.goodsCode" filterable
clearable @change="val => changeGoods(val, scope.index)">
<el-select
v-model="scope.row.goodsCode"
filterable
clearable
@change="val => changeGoods(val, scope.index)"
>
<el-option
v-for="item in goodsList"
:key="item.id"
@ -47,8 +79,12 @@
</el-select>
</template>
<template #shId="scope">
<el-select v-model="scope.row.shId" @change="val => changeWare(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.shId"
@change="val => changeWare(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.shList"
:key="item.id"
@ -58,8 +94,12 @@
</el-select>
</template>
<template #slId="scope">
<el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.slId"
@change="val => changeLocation(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.slList"
:key="item.id"
@ -69,8 +109,12 @@
</el-select>
</template>
<template #piNo="scope">
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.piNo"
@change="val => changePiNo(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.piNoList"
:key="item.id"
@ -93,7 +137,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button type="primary" @click="submit" :loading="submitLoading"> </el-button>
</span>
</template>
</el-dialog>
@ -128,7 +172,7 @@ export default {
option: {
columnSort: true,
tip: false,
height:window.innerHeight - 200,
height: window.innerHeight - 250,
align: 'center',
calcHeight: 32,
simplePage: false,
@ -288,6 +332,15 @@ export default {
},
data: [],
selectionList: [],
ruleForm: {
picker: '',
pickerName: '',
},
rules: {
picker: [{ required: true, message: '请选择领用人', trigger: 'change' }],
},
submitLoading:false,
};
},
mounted() {
@ -312,6 +365,9 @@ export default {
},
},
methods: {
projectHeadChange(value, item) {
this.ruleForm.pickerName = item.name;
},
getGoods() {
getGoodsList().then(res => {
this.goodsList = res.data.data.records;
@ -436,7 +492,7 @@ export default {
// 1.
const invalidRow = this.data.filter(row => {
// 0undefined
const requireQty = row.requireQty || 0;
const requireQty = row.needQuantity || 0;
// 0
const outQty = row.outQty || 0;
@ -446,33 +502,43 @@ export default {
//
return outQty > maxAllowedQty;
});
console.log(898989898,invalidRow)
// 2.
if (invalidRow.length>0) {
//
const requireQty = invalidRow[0].requireQty;
const maxAllowedQty = requireQty + (requireQty * 0.2);
if (invalidRow.length > 0) {
//
const requireQtys = invalidRow[0].needQuantity;
const maxAllowedQty = requireQtys + requireQtys * 0.2;
//
const identifier = invalidRow[0].cardNo;
this.$message.error(
`流程卡/零件 [${identifier}] 的出库数量超过允许最大值 (${maxAllowedQty.toFixed(0)}),请调整后重试!`
`流程卡/零件 [${identifier}] 的出库数量超过允许最大值 (${maxAllowedQty.toFixed(
0
)})请调整后重试`
);
return;
}
//
const submitData = this.data.map(row => {
const { _select, shList, slList, piNoList, ...validData } = row; //
validData.picker = this.ruleForm.picker;
validData.pickerName = this.ruleForm.pickerName;
return validData;
});
console.log('submitData', submitData);
batchIssue(submitData).then(res => {
if (res.data.code === 200) {
this.$message.success('出库成功');
this.closeDialog(true);
this.$refs.ruleFormRef.validate(validate => {
if (validate) {
// this.closeDialog(this.currentRow);
this.submitLoading = true;
batchIssue(submitData).then(res => {
if (res.data.code === 200) {
this.$message.success('出库成功');
this.closeDialog(true);
}
}).catch(err => {
this.submitLoading = false;
});
}
});
},

@ -387,6 +387,12 @@ export default {
search: false,
width: 120,
},
{
label: '领料人',
prop: 'pickerName',
search: false,
width: 120,
},
],
},
isAddOpen: false,

@ -16,6 +16,34 @@
></el-input>
<el-button type="danger" @click="delFn" style="float: right">删除</el-button>
</div>
<el-form
ref="ruleFormRef"
style="max-width: 300px"
:model="ruleForm"
:rules="rules"
label-width="auto"
>
<el-form-item label="领用人" prop="picker">
<jhSelect
v-model="ruleForm.picker"
placeholder="请搜索选择"
api-url="/blade-system/user/page"
echo-api="/blade-system/user/page"
echoParamsKey="ids"
echo-method="get"
api-method="get"
list-key="records"
total-key="total"
label-key="realName"
value-key="id"
search-key="realName"
:debounce-time="500"
@change="projectHeadChange"
:title="title"
:disabled="isDetail"
/>
</el-form-item>
</el-form>
<avue-crud
:option="option"
@ -36,8 +64,12 @@
@cell-click="cellClick"
>
<template #goodsCode="scope">
<el-select v-model="scope.row.goodsCode" filterable
clearable @change="val => changeGoods(val, scope.index)">
<el-select
v-model="scope.row.goodsCode"
filterable
clearable
@change="val => changeGoods(val, scope.index)"
>
<el-option
v-for="item in goodsList"
:key="item.id"
@ -47,8 +79,12 @@
</el-select>
</template>
<template #shId="scope">
<el-select v-model="scope.row.shId" @change="val => changeWare(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.shId"
@change="val => changeWare(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.shList"
:key="item.id"
@ -58,8 +94,12 @@
</el-select>
</template>
<template #slId="scope">
<el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.slId"
@change="val => changeLocation(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.slList"
:key="item.id"
@ -69,8 +109,12 @@
</el-select>
</template>
<template #piNo="scope">
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.index)" filterable
clearable>
<el-select
v-model="scope.row.piNo"
@change="val => changePiNo(val, scope.index)"
filterable
clearable
>
<el-option
v-for="item in scope.row.piNoList"
:key="item.id"
@ -79,9 +123,9 @@
></el-option>
</el-select>
</template>
<template #outQty="scope">
<template #outedQuantity="scope">
<el-input-number
v-model="scope.row.outQty"
v-model="scope.row.outedQuantity"
:min="1"
:max="scope.row.stockQty"
style="width: 90%"
@ -93,7 +137,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button type="primary" @click="submit" :loading="submitLoading"> </el-button>
</span>
</template>
</el-dialog>
@ -119,6 +163,7 @@ export default {
},
data() {
return {
submitLoading: false,
openShow: false,
formInline: {
orderId: '',
@ -128,7 +173,7 @@ export default {
option: {
columnSort: true,
tip: false,
height:window.innerHeight - 200,
height: window.innerHeight - 250,
align: 'center',
calcHeight: 32,
simplePage: false,
@ -180,18 +225,6 @@ export default {
width: 150,
search: false,
},
{
label: '零件号',
prop: 'partCode',
width: 150,
search: false,
},
{
label: '零件名称',
prop: 'partName',
width: 150,
search: false,
},
{
label: '流程卡号',
prop: 'cardNo',
@ -200,7 +233,7 @@ export default {
},
{
label: '生产数量',
prop: 'quantity',
prop: 'needQuantity',
search: false,
width: 120,
},
@ -229,65 +262,32 @@ export default {
search: false,
},
{
label: '批次号',
prop: 'piNo',
label: '出库数量',
prop: 'outedQuantity',
width: 150,
search: false,
},
{
label: '是否印字',
prop: 'printMark',
width: 120,
search: false,
type: 'select',
dicData: [
{ label: '是', value: true },
{ label: '否', value: false },
],
},
{
label: '粉重',
prop: 'powderWeight',
width: 120,
search: false,
},
{
label: '材料号',
prop: 'materialNo',
search: false,
width: 120,
},
{
label: '成型厚度',
prop: 'thickness',
width: 120,
search: false,
},
{
label: '炉批号',
prop: 'stovePiNo',
label: '批次号',
prop: 'piNo',
width: 150,
search: false,
width: 120,
},
// {
// label:"",
// prop: "outQuantity",
// width:150,
// },
{
label: '库存数量',
prop: 'stockQty',
width: 120,
},
{
label: '出库数量',
prop: 'outQty',
width: 150,
},
],
},
data: [],
selectionList: [],
ruleForm: {
picker: '',
pickerName: '',
},
rules: {
picker: [{ required: true, message: '请选择领用人', trigger: 'change' }],
},
};
},
mounted() {
@ -312,6 +312,9 @@ export default {
},
},
methods: {
projectHeadChange(value, item) {
this.ruleForm.pickerName = item.name;
},
getGoods() {
getGoodsList().then(res => {
this.goodsList = res.data.data.records;
@ -340,7 +343,7 @@ export default {
let data_ = res.data.data;
// data_[0].outQty =data_.requireQty
data_.forEach(item => {
item.outQty = item.requireQty;
item.outedQuantity = item.requireQty;
});
let data = [...res.data.data, ...this.data];
@ -380,7 +383,7 @@ export default {
this.data[index].shId = '';
this.data[index].slId = '';
this.data[index].stockQty = '';
this.data[index].outQty = '';
this.data[index].outedQuantity = '';
getWarehouseList({
goodsCode: val,
@ -436,9 +439,9 @@ export default {
// 1.
const invalidRow = this.data.filter(row => {
// 0undefined
const requireQty = row.requireQty || 0;
const requireQty = row.needQuantity || 0;
// 0
const outQty = row.outQty || 0;
const outQty = row.outedQuantity || 0;
// ( + 20%)
const maxAllowedQty = requireQty + requireQty * 0.2;
@ -446,35 +449,50 @@ export default {
//
return outQty > maxAllowedQty;
});
console.log(898989898,invalidRow)
console.log(898989898, invalidRow);
// 2.
if (invalidRow.length>0) {
//
const requireQty = invalidRow[0].requireQty;
const maxAllowedQty = requireQty + (requireQty * 0.2);
if (invalidRow.length > 0) {
//
const requireQty = invalidRow[0].needQuantity;
const maxAllowedQty = requireQty + requireQty * 0.2;
//
const identifier = invalidRow[0].cardNo;
this.$message.error(
`流程卡/零件 [${identifier}] 的出库数量超过允许最大值 (${maxAllowedQty.toFixed(0)}),请调整后重试!`
`流程卡/零件 [${identifier}] 的出库数量超过允许最大值 (${maxAllowedQty.toFixed(
0
)})请调整后重试`
);
return;
}
//
const submitData = this.data.map(row => {
const { _select, shList, slList, piNoList, ...validData } = row; //
validData.picker = this.ruleForm.picker;
validData.pickerName = this.ruleForm.pickerName;
return validData;
});
console.log('submitData', submitData);
batchIssue(submitData).then(res => {
if (res.data.code === 200) {
this.$message.success('出库成功');
this.closeDialog(true);
this.$refs.ruleFormRef.validate(validate => {
if (validate) {
this.submitLoading = true;
// this.closeDialog(this.currentRow);
batchIssue(submitData)
.then(res => {
if (res.data.code === 200) {
this.$message.success('出库成功');
this.submitLoading = false;
this.closeDialog(true);
}
})
.catch(err => {
this.submitLoading = false;
});
}
});
console.log('submitData', submitData);
},
delFn() {
if (this.selectionList.length == 0) {

@ -190,7 +190,7 @@ export default {
},
{
label: '批次号',
prop: 'batchCode',
prop: 'piNo',
search: false,
width: 150,
},
@ -218,7 +218,7 @@ export default {
},
{
label: '物料需求数量',
prop: 'requireQty',
prop: 'needQuantity',
search: false,
width: 120,
},
@ -236,7 +236,7 @@ export default {
},
{
label: '已出库数量',
prop: 'outQty',
prop: 'outedQuantity',
search: false,
width: 120,
},
@ -285,6 +285,12 @@ export default {
search: false,
width: 120,
},
{
label: '领料人',
prop: 'pickerName',
search: false,
width: 120,
},
],
},
isAddOpen: false,
@ -353,7 +359,7 @@ export default {
this.submitLoading = true
let param = {
rlsId: this.scrapForm.rlsId,
bfType: 3,
bfType: 4,
outQty: this.scrapForm.scarpNum,
woCode: this.scrapForm.woCode,
approver: this.scrapForm.approver,

@ -24,7 +24,7 @@
<template #menu-right> </template>
<template #menu="{ row }">
<el-button type="text" @click="detailsFn(row)" v-if="permission.distribution_details">详情</el-button>
<el-button type="text" @click="closeFn(row)" v-if="permission.distribution_details">关闭</el-button>
<el-button type="text" @click="closeFn(row)" v-if="permission.distribution_close">关闭</el-button>
</template>
</avue-crud>
<!-- 新增 -->

@ -0,0 +1,307 @@
<template>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<el-button type="danger" @click="handleOut">作废</el-button>
</template>
<template #menu-right>
<el-button type="primary" @click="handleImport">导入 </el-button>
</template>
<template #menu="{ row }"> </template>
</avue-crud>
<!-- 导入 -->
<basic-import
v-if="isShowImport"
title="导入"
:isShow="isShowImport"
templateUrl="/blade-desk/BA/UrgentPart/downloadExcelTemplate"
templateName="急件维护模板.xls"
importUrl="/blade-desk/BA/UrgentPart/importExcel"
@closeDialog="closeDialog"
></basic-import>
</basic-container>
</template>
<script>
import { getList, voidRecords } from '@/api/orderManagement/urgentUphold';
import basicImport from '@/components/basic-import/main.vue';
export default {
components: {basicImport},
data() {
return {
form: {},
selectionList: [],
query: {},
loading: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
columnSort: true,
tip: false,
height: 'auto',
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: false,
selection: true,
addBtn: false,
editBtn: false,
viewBtn: false,
delBtn: false,
editBtnText: '修改',
labelWidth: 120,
menuWidth: 80,
dialogWidth: 900,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
excelBtn: true,
showOverflowTooltip: true,
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
gridBtn: false,
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
searchLabelWidth: 'auto',
align: 'center',
menu: false,
column: [
{
label: '计划单号',
prop: 'planNo',
search: true,
sortable: true,
span: 12,
},
{
label: '零件号',
prop: 'partCode',
search: true,
sortable: true,
span: 12,
},
{
label: '批次号',
prop: 'batchNo',
search: true,
sortable: true,
span: 12,
},
{
label: '需求交期',
prop: 'requireDate',
search: true,
sortable: true,
span: 12,
type: 'date', //
format: 'YYYY-MM-DD', //
valueFormat: 'YYYY-MM-DD', //
},
{
label: '到期日期',
prop: 'expireDate',
search: false,
sortable: true,
span: 12,
type: 'date', //
format: 'YYYY-MM-DD', //
valueFormat: 'YYYY-MM-DD', //
},
{
label: '状态',
prop: 'status',
search: true,
sortable: true,
span: 12,
type: 'select',
dicData: [
{ label: '生效', value: 0 },
{ label: '作废', value: 1 },
],
},
{
label: '维护人',
prop: 'updateUserName',
search: false,
sortable: true,
span: 12,
},
{
label: '维护时间',
prop: 'updateTime',
search: false,
sortable: true,
span: 12,
},
],
},
data: [],
isShowImport: false,
};
},
methods: {
//
handleImport() {
this.isShowImport = true;
},
closeDialog(val) {
this.isShowImport = false;
this.onLoad(this.page);
},
//
handleOut() {
if (this.selectionList.length == 0) {
this.$message({
type: 'warning',
message: '请选择数据!',
});
return;
}
const validRecords = this.selectionList.filter(item => item.status == 0);
if (validRecords.length === 0) {
this.$message.warning('请选择生效中的数据!');
return;
}
this.$confirm('确定将选择数据状态改成作废?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let ids = validRecords.map(item => item.id);
voidRecords(ids).then(res => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
// return removePersonAbility(row.id);
});
},
rowSave(row, done, loading) {
// addPersonAbility(row).then(
// () => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
// done();
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
rowUpdate(row, index, done, loading) {
// updatePersonAbility(row).then(
// () => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
// done();
// },
// error => {
// window.console.log(error);
// loading();
// }
// );
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
// return removePersonAbility(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
this.selectionClear();
});
},
},
mounted() {},
};
</script>
d

@ -212,6 +212,7 @@ export default {
{label:'领料出库',value:13 },
{label:'刀具出库',value:15 },
{label:'玻璃饼出库',value:16 },
{label:'石墨模出库',value:17 },
]
},

Loading…
Cancel
Save