暂存问题修改

master
zhangdi 3 days ago
parent 8fc033b832
commit 63c7320fda
  1. 2
      src/router/axios.js
  2. 5
      src/views/firstOrder/components/batchSelectionDialog.vue
  3. 10
      src/views/firstOrder/components/outDialog.vue
  4. 10
      src/views/firstOrder/inbound.vue
  5. 52
      src/views/firstOrder/outbound.vue

@ -23,7 +23,7 @@ import crypto from '@/util/crypto';
let isErrorShown = false;
//默认超时时间
axios.defaults.timeout = 10000;
axios.defaults.timeout = 90000;
//返回其他状态码
axios.defaults.validateStatus = function (status) {
return status >= 200 && status <= 500;

@ -94,7 +94,6 @@ export default {
console.log('666666', selection, parentRow)
const maxAllowed = parentRow.applicationQuantity - parentRow.outboundQuantity;
if(selection.length>(parentRow.applicationQuantity-parentRow.outboundQuantity)){
this.$message.error('勾选数量不能大于申请数量')
const validSelection = selection.slice(0, maxAllowed);
const removedItems = selection.slice(maxAllowed);
const selectionWithParent = validSelection.map(item => ({
@ -102,6 +101,8 @@ export default {
parentMaterialId: parentRow.materialId,
parentDepartmentName: parentRow.departmentName,
applicationQuantity: parentRow.applicationQuantity,
department:parentRow.department,
departmentName:parentRow.departmentName,
ldDemandEndId: parentRow.ldDemandEndId,
outboundQuantity: parentRow.outboundQuantity,
}));
@ -125,6 +126,8 @@ export default {
applicationQuantity: parentRow.applicationQuantity,
ldDemandEndId: parentRow.ldDemandEndId,
outboundQuantity:parentRow.outboundQuantity,
department:parentRow.department,
departmentName:parentRow.departmentName,
}));
//

@ -580,7 +580,6 @@ export default {
item.materialCode === stat.materialCode &&
item.materialName === stat.materialName
);
console.log(898989, detailList);
detail.theOutboundQuantity = detailList.reduce(
(acc, cur) => acc + cur.num,
0
@ -911,6 +910,15 @@ export default {
}
}
}
if(this.sizeForm.options==2 ){
console.log(898989,'易耗是否选择部门!')
const invalidRow = this.sizeForm.inTableData.find(row => !row.department);
if (invalidRow) {
this.$message.error("存在未选择部门的物资,请补充完整");
return;
}
}
// status == 1 2
this.sizeForm.status = index;
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData;

@ -156,12 +156,12 @@ export default {
label: "入库日期",
prop: "inDate",
search: true,
type: "datetime",
type: "date",
searchRange: true,
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm",
width: 160,
align: "center",
// searchParam: 'startTime',
@ -354,8 +354,8 @@ export default {
pageNum: page.currentPage,
};
if (queryParams.inDate && Array.isArray(queryParams.inDate)) {
queryParams.startTime = queryParams.inDate[0];
queryParams.endTime = queryParams.inDate[1];
queryParams.startTime = queryParams.inDate[0]+":00";
queryParams.endTime = queryParams.inDate[1]+":59";
delete queryParams.inDate;
}
getList(page.currentPage, page.pageSize, queryParams).then((res) => {

@ -45,7 +45,16 @@
@click.stop="handleEdit(scope.row)"
>编辑</el-button
>
<el-button
type="text"
v-if="scope.row.status == 1 || scope.row.status == 2"
@click.stop="handleDel(scope.row)"
>删除</el-button
>
</template>
<!-- <template #outDate="scope">
{{ scope.row.outDate }}
</template> -->
</avue-crud>
<outDialog
v-if="outDialogVisible"
@ -72,7 +81,7 @@
</template>
<script>
import { getList } from "@/api/firstOrder/outbound";
import { getList, deleteList } from "@/api/firstOrder/outbound";
import outDialog from "./components/outDialog.vue";
import needDialog from "./components/needDialog.vue";
export default {
@ -113,7 +122,7 @@ export default {
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuWidth: 120,
menuWidth: 150,
menu: true,
menuAlign: "left",
searchMenuPosition: "right",
@ -156,12 +165,12 @@ export default {
label: "出库日期",
prop: "outDate",
search: true,
type: "datetime",
type: "date",
searchRange: true,
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm",
width: 140,
headerAlign: "center",
align: "center",
@ -172,7 +181,7 @@ export default {
search: false,
headerAlign: "center",
align: "center",
width: 110,
width: 110,
},
{
label: "物资类型",
@ -268,6 +277,33 @@ export default {
this.outDialogTiltle = "编辑";
this.id = row.id;
},
//
handleDel(row) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteList({id:row.id})
.then((res) => {
this.$message({
type: "success",
message: "删除成功!",
});
this.onLoad(this.page, this.query);
})
.catch(() => {
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
purchaseFn(row) {
console.log("xuqiudanchuku");
@ -343,8 +379,8 @@ export default {
pageNum: page.currentPage,
};
if (queryParams.outDate && Array.isArray(queryParams.outDate)) {
queryParams.startTime = queryParams.outDate[0];
queryParams.endTime = queryParams.outDate[1];
queryParams.startTime = queryParams.outDate[0]+":00";
queryParams.endTime = queryParams.outDate[1]+':00';
delete queryParams.outDate;
}
getList(page.currentPage, page.pageSize, queryParams).then((res) => {

Loading…
Cancel
Save