问题修改

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. 125
      src/views/basicData/bsPlanAssignSteerModify/addEditDialog.vue
  5. 26
      src/views/basicData/bsPlanAssignSteerModify/checkDialog.vue
  6. 41
      src/views/basicData/bsPlanAssignSteerModify/index.vue
  7. 100
      src/views/inboundOutboundManagement/glassCakeOutbound/components/outboundDialog.vue
  8. 6
      src/views/inboundOutboundManagement/glassCakeOutbound/index.vue
  9. 182
      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({ return request({
url: '/blade-desk/quality/planAssignSteerModify/submitApproval', url: '/blade-desk/quality/planAssignSteerModify/submitApproval',
method: 'post', method: 'post',
data: data params: data
}); });
}; };
@ -55,3 +55,21 @@ export const auditHistory = (id) => {
method: 'get', 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', menuAlign: 'left',
gridBtn: false, gridBtn: false,
searchMenuPosition: 'right', searchMenuPosition: 'right',
searchLabelWidth:'auto',
align: 'center', align: 'center',
column: [ column: [
{ {

@ -2,13 +2,13 @@
<el-dialog :title="title" append-to-body :modelValue="openShow" width="60%" @close="closeDialog"> <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-form ref="form" :model="formData" :rules="rules" label-width="90px" class="vd-form-row">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8" v-if="title == '修改'">
<el-form-item label="申请时间:" prop="createTime"> <el-form-item label="申请时间:" prop="createTime">
<el-input v-model="formData.createTime" type="String" disabled /> </el-form-item <el-input v-model="formData.createTime" type="String" disabled /> </el-form-item
></el-col> ></el-col>
<el-col :span="8" <el-col :span="8"
><el-form-item label="申请人:" prop="createMan"> ><el-form-item label="申请人:" prop="createManName">
<el-input v-model="formData.createMan" type="String" disabled /> </el-form-item <el-input v-model="formData.createManName" type="String" disabled /> </el-form-item
></el-col> ></el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="工艺能力:" prop="platingId"> <el-form-item label="工艺能力:" prop="platingId">
@ -30,7 +30,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="16">
<el-form-item label="备注:"> <el-form-item label="备注:">
<el-input v-model="formData.pasmMemo" type="textarea" style="width: 99%" /> <el-input v-model="formData.pasmMemo" type="textarea" style="width: 99%" />
</el-form-item> </el-form-item>
@ -38,13 +38,6 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="附件:"> <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 <el-upload
class="upload-demo" class="upload-demo"
action="/api/blade-resource/oss/endpoint/put-file-attach" action="/api/blade-resource/oss/endpoint/put-file-attach"
@ -77,7 +70,25 @@
<template #header> <template #header>
<span><i style="color: red">*</i>供应商</span> <span><i style="color: red">*</i>供应商</span>
</template> </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>
<el-table-column prop="assignScale" align="center" label="分派比例(%)"> <el-table-column prop="assignScale" align="center" label="分派比例(%)">
<template #header> <template #header>
@ -92,14 +103,15 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <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> </span>
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getAbility } from '@/api/basicData/workCenter'; 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 { export default {
props: { props: {
showDialog: { showDialog: {
@ -116,6 +128,9 @@ export default {
}, },
moldAddMore: { type: Boolean, default: true }, moldAddMore: { type: Boolean, default: true },
}, },
computed: {
...mapGetters(['userInfo']),
},
data() { data() {
return { return {
openShow: false, openShow: false,
@ -123,6 +138,7 @@ export default {
platingId: null, platingId: null,
pasmMemo: null, pasmMemo: null,
modifyLst: [], modifyLst: [],
attachment: '',
}, },
rules: { rules: {
platingId: [{ required: true, message: '请选择工艺能力', trigger: 'blur' }], platingId: [{ required: true, message: '请选择工艺能力', trigger: 'blur' }],
@ -151,16 +167,38 @@ export default {
formError: '', // formError: '', //
abilityList: [], abilityList: [],
fileList: [], fileList: [],
submitLoading: false,
}; };
}, },
mounted() { mounted() {
this.openShow = this.showDialog; this.openShow = this.showDialog;
this.getAbilityData(); 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: { 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() { getAbilityData() {
getAbility().then(res => { getAbility().then(res => {
this.abilityList = res.data.data; this.abilityList = res.data.data;
@ -168,35 +206,23 @@ export default {
}, },
// //
bsCraftAbilityChange(idList, item) { bsCraftAbilityChange(idList, item) {
this.query(idList); let query = {
}, caId: idList,
query(caId) { };
// this.$ajax.post('bsPlanAssignSteerModify/queryData/', { 'pasmId': this.trId, 'caId': caId }).then((res) => { this.detailFn(query);
// if (res.code === 0) { },
// const { modify, modifyLst } = res.data; selectChange(list, row) {
// if (modify != null) { row._select = !row._select;
// this.formData = modify;
// this.bsCraftAbilityOption = [modify.platingId];
// this.docUploadInit();
// }
// if (modifyLst != null) {
// this.fromDataDetails = modifyLst;
// }
// }
// });
}, },
// push modifyLst // push modifyLst
addTable() { addTable() {
this.formData.modifyLst.push({ this.formData.modifyLst.push({
_select: false, // _select: false, //
wcId: '', // ID
batchNo: '', // /
preserveContent: '', //
}); });
}, },
// //
delTable() { delTable(row) {
this.formData.modifyLst = this.formData.modifyLst.filter(row => !row._select); this.formData.modifyLst = this.formData.modifyLst.filter(row => !row._select);
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
@ -205,7 +231,7 @@ export default {
handleSuccess(response, file, fileList) { handleSuccess(response, file, fileList) {
console.log(response.data, 'response.data.link'); console.log(response.data, 'response.data.link');
// this.ruleForm.attachId = response.data.attachId; // this.ruleForm.attachId = response.data.attachId;
this.formData.attachment = JSON.stringify(response.data);
this.fileList.push(response.data); this.fileList.push(response.data);
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
@ -219,9 +245,28 @@ export default {
submit() { submit() {
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
let params = { this.submitLoading = true;
...this.formData, 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> </el-dialog>
</template> </template>
<script> <script>
import { submitApproval } from '@/api/basicData/bsPlanAssignSteerModify'; import { audit } from '@/api/basicData/bsPlanAssignSteerModify';
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -37,8 +37,8 @@ export default {
span: 24, span: 24,
type: 'radio', type: 'radio',
dicData: [ dicData: [
{ label: '通过', value: 0 }, { label: '通过', value: 1 },
{ label: '不通过', value: 1 }, { label: '不通过', value: 2 },
], ],
rules: [{ required: true, message: '请选择', trigger: 'blur' }], rules: [{ required: true, message: '请选择', trigger: 'blur' }],
}, },
@ -63,16 +63,16 @@ export default {
submit() { submit() {
this.$refs.form.validate(async valid => { this.$refs.form.validate(async valid => {
if (valid) { if (valid) {
// let params = { let params = {
// id: this.$route.query.id, // ...this.form,
// approvalStatus: '', id: this.rowItem.id,
// }; result: this.form.result,
// submitApproval(params).then((res) => { remark: this.form.remark,
// if (res.code == 200) { };
// this.$message.success(''); audit(params).then(res => {
// this.closeDialog(); this.$message.success('操作成功');
// } this.closeDialog();
// }); });
} }
}); });
}, },

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

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

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

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

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

@ -24,7 +24,7 @@
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text" @click="detailsFn(row)" v-if="permission.distribution_details">详情</el-button> <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> </template>
</avue-crud> </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:13 },
{label:'刀具出库',value:15 }, {label:'刀具出库',value:15 },
{label:'玻璃饼出库',value:16 }, {label:'玻璃饼出库',value:16 },
{label:'石墨模出库',value:17 },
] ]
}, },

Loading…
Cancel
Save