一级库页面调整

master
taozi 4 months ago
parent c292cbad6b
commit c1b7dc213e
  1. 6
      src/views/firstOrder/components/approvalProcessDialog.vue
  2. 65
      src/views/firstOrder/components/inDialog.vue
  3. 84
      src/views/firstOrder/components/outDialog.vue
  4. 1
      src/views/firstOrder/inbound.vue
  5. 12
      src/views/firstOrder/list.vue
  6. 7
      src/views/firstOrder/outbound.vue
  7. 54
      src/views/materials/index.vue
  8. 15
      src/views/secondOrder/components/approvalProcessDialog.vue
  9. 69
      src/views/secondOrder/outbound.vue

@ -92,7 +92,7 @@ export default {
margin: 0 auto 0 margin: 0 auto 0
} }
:deep(.el-dialog__body) { // :deep(.el-dialog__body) {
height: 300px; // height: 300px;
} // }
</style> </style>

@ -91,16 +91,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="theInboundQuantity" label="本次入库数量"> <el-table-column prop="theInboundQuantity" label="本次入库数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="0" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" v-if='inDialogType != "details"'></el-input-number> @change="syncInboundQuantity(scope.row)" v-if='inDialogType != "details"'></el-input-number>
<span v-else>{{ scope.row.theInboundQuantity || 0 }}</span> <span v-else>{{ scope.row.theInboundQuantity === undefined ? 0 : scope.row.theInboundQuantity }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.unitPrice" :min="0" style="width: 100%;"
@change="syncUnitPrice(scope.row)"
v-if='inDialogType != "details" && scope.row.type !== "YH"'></el-input-number>
<span v-else-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 单项选择 --> <!-- 单项选择 -->
<el-table :data="sizeForm.singleData" border style="width: 100%" v-show="sizeForm.option == 2"> <el-table :data="sizeForm.singleData" border style="width: 100%" v-show="sizeForm.option == 2" align="center">
<el-table-column prop="materialCode" label="物资编码"></el-table-column> <el-table-column prop="materialCode" label="物资编码"></el-table-column>
<el-table-column prop="materialName" label="物资名称"> <el-table-column prop="materialName" label="物资名称">
<template slot-scope="scope"> <template slot-scope="scope">
@ -134,7 +142,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="theInboundQuantity" label="本次入库数量"> <el-table-column prop="theInboundQuantity" label="本次入库数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="0" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" v-if='inDialogType != "details"'></el-input-number> @change="syncInboundQuantity(scope.row)" v-if='inDialogType != "details"'></el-input-number>
<span v-else>{{ scope.row.theInboundQuantity || 0 }}</span> <span v-else>{{ scope.row.theInboundQuantity || 0 }}</span>
</template> </template>
@ -142,7 +150,9 @@
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.unitPrice" :min="0" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.unitPrice" :min="0" style="width: 100%;"
@change="syncUnitPrice(scope.row)" v-if='inDialogType != "details"'></el-input-number> @change="syncUnitPrice(scope.row)"
v-if='inDialogType != "details" && scope.row.type !== "YH"'></el-input-number>
<span v-else-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span> <span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -174,12 +184,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库信息"> <el-table-column prop="date" label="入库信息">
<el-table-column prop="theInboundQuantity" label="数量"> <el-table-column prop="theInboundQuantity" label="数量">
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库后库存"> <el-table-column prop="date" label="入库后库存">
@ -189,6 +207,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template>s
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="入库信息"> <el-table-column prop="date" label="入库信息">
@ -220,11 +242,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="单位"></el-table-column> <el-table-column prop="unit" label="单位"></el-table-column>
<el-table-column prop="inboundQuantity" label="数量">
</el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unitPrice || 0 }} <span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -233,7 +254,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unitPrice }} <span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -245,7 +267,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unitPrice || 0 }} <span v-if='scope.row.type === "YH"'>-</span>
<span v-else>{{ scope.row.unitPrice || 0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -435,6 +458,7 @@ export default {
// const randomNum = Math.floor(Math.random() * 100000000) + 1; // const randomNum = Math.floor(Math.random() * 100000000) + 1;
// this.sizeForm.orderNo = String(randomNum).padStart(8, '0');// // this.sizeForm.orderNo = String(randomNum).padStart(8, '0');//
this.sizeForm.inDate = new Date()// this.sizeForm.inDate = new Date()//
this.sizeForm.inTableData.theInboundQuantity = 0
}, },
// //
handleCloseDetail() { handleCloseDetail() {
@ -450,7 +474,7 @@ export default {
status: '',// status: '',//
materialId: '', materialId: '',
materialName: '', materialName: '',
theInboundQuantity: 1, theInboundQuantity: 0,
unitPrice: 0, unitPrice: 0,
}) })
} else { } else {
@ -465,7 +489,7 @@ export default {
status: '',// status: '',//
materialId: '', materialId: '',
materialName: '', materialName: '',
theInboundQuantity: 1, theInboundQuantity: 0,
unitPrice: 0, unitPrice: 0,
}; };
this.sizeForm.singleData.push(newRow); this.sizeForm.singleData.push(newRow);
@ -564,8 +588,8 @@ export default {
this.$message.error("物资名称不能为空"); this.$message.error("物资名称不能为空");
return; return;
} }
if (!row.theInboundQuantity || row.theInboundQuantity <= 0) { if (!row.theInboundQuantity || row.theInboundQuantity < 0) {
this.$message.error("本次入库数量必须大于0"); this.$message.error("本次入库数量不能为空");
return; return;
} }
if (row.unitPrice === undefined || row.unitPrice < 0) { if (row.unitPrice === undefined || row.unitPrice < 0) {
@ -594,8 +618,8 @@ export default {
this.$message.error("物资名称不能为空"); this.$message.error("物资名称不能为空");
return; return;
} }
if (!row.theInboundQuantity || row.theInboundQuantity <= 0) { if (!row.theInboundQuantity || row.theInboundQuantity < 0) {
this.$message.error("本次入库数量必须大于0"); this.$message.error("本次入库数量不能为空");
return; return;
} }
if (row.unitPrice === undefined || row.unitPrice <= 0) { if (row.unitPrice === undefined || row.unitPrice <= 0) {
@ -636,7 +660,7 @@ export default {
} else { } else {
this.$message.error(res.data.message || "提交失败"); this.$message.error(res.data.message || "提交失败");
} }
} catch (error) { } catch (error) {
this.$message.error(error.message || "服务器错误"); this.$message.error(error.message || "服务器错误");
} }
@ -653,7 +677,7 @@ export default {
// type // type
handleTypeChange(row) { handleTypeChange(row) {
if (row.type === 'YH') { if (row.type === 'YH') {
// 600 // row.unitPrice = null;
if (Number(row.unitPrice) > 600) { if (Number(row.unitPrice) > 600) {
this.$confirm('单价大于600元,确定要选择为易耗品吗?', '提示', { this.$confirm('单价大于600元,确定要选择为易耗品吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -681,4 +705,9 @@ export default {
font-weight: 600; font-weight: 600;
padding: 18px 0; padding: 18px 0;
} }
::v-deep .el-table td,
::v-deep .el-table th {
text-align: center !important;
}
</style> </style>

@ -39,6 +39,15 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="sizeForm.options === 2">
<el-form-item label="选项">
<el-radio-group v-model="sizeForm.radio" :disabled="outDialogType == 'details'">
<el-radio :label="1">易耗品</el-radio>
<el-radio :label="2">耐用品</el-radio>
<el-radio :label="3">全部</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="sizeForm.options == 1"> <el-col :span="12" v-if="sizeForm.options == 1">
<el-form-item label="需求单名称"> <el-form-item label="需求单名称">
<el-input v-model="sizeForm.demandEndInfo" disabled></el-input> <el-input v-model="sizeForm.demandEndInfo" disabled></el-input>
@ -69,6 +78,11 @@
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} {{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="出库类型">
<template slot-scope="scope">
{{ scope.row.type === "NY" ? "出库单" : (scope.row.type === "YH" ? "发放单" : "") }}
</template>
</el-table-column>
<el-table-column prop="unit" label="单位"> <el-table-column prop="unit" label="单位">
</el-table-column> </el-table-column>
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options === 2"> <el-table-column prop="departmentName" label="部门" v-if="sizeForm.options === 2">
@ -91,17 +105,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="theOutboundQuantity" label="本次出库数量"> <el-table-column prop="theOutboundQuantity" label="本次出库数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="0" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number> @change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number>
<!-- <span v-else>{{ scope.row.theOutboundQuantity || 0 }}</span> --> <!-- <span v-else>{{ scope.row.theOutboundQuantity || 0 }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="status" label="出库情况">
<template slot-scope="scope">
<el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">出库</el-button>
<span v-if="scope.row.status == 0">已出库</span>
</template>
</el-table-column> -->
</el-table> </el-table>
<div class="form-title" v-if="outDialogType !== 'details'">出库账目表格</div> <div class="form-title" v-if="outDialogType !== 'details'">出库账目表格</div>
<el-table :data="sizeForm.inTableData" border style="width: 100%" v-if="outDialogType !== 'details'"> <el-table :data="sizeForm.inTableData" border style="width: 100%" v-if="outDialogType !== 'details'">
@ -117,6 +125,11 @@
{{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }} {{ scope.row.type === "NY" ? "耐用品" : (scope.row.type === "YH" ? "易耗品" : "") }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="出库类型">
<template slot-scope="scope">
{{ scope.row.type === "NY" ? "出库单" : (scope.row.type === "YH" ? "发放单" : "") }}
</template>
</el-table-column>
<el-table-column prop="departmentName" label="部门" v-if="sizeForm.options == 2"> <el-table-column prop="departmentName" label="部门" v-if="sizeForm.options == 2">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
@ -130,14 +143,10 @@
<el-table-column prop="date" label="出库信息" v-if="sizeForm.options == 1"> <el-table-column prop="date" label="出库信息" v-if="sizeForm.options == 1">
<el-table-column prop="outboundQuantity" label="数量"> <el-table-column prop="outboundQuantity" label="数量">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.outboundQuantity || 0 }} {{ scope.row.outboundQuantity || 0 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="date" label="出库后库存" v-if="sizeForm.options == 1">
<el-table-column prop="str10" label="数量">
</el-table-column>
</el-table-column> -->
</el-table> </el-table>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -170,6 +179,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="选项">
<el-radio-group v-model="sizeForm.radio" :disabled="outDialogType == 'details'">
<el-radio :label="1">易耗品</el-radio>
<el-radio :label="2">耐用品</el-radio>
<el-radio :label="3">全部</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -206,12 +224,12 @@
{{ scope.row.outboundQuantity || 0 }} {{ scope.row.outboundQuantity || 0 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="theOutboundQuantity" label="本次出库数量"> <!-- <el-table-column prop="theOutboundQuantity" label="本次出库数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;" <el-input-number size="mini" v-model="scope.row.theOutboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number> @change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -259,8 +277,9 @@ export default {
inTableData: [], inTableData: [],
ldOneOutStorageDetailVOList: [], ldOneOutStorageDetailVOList: [],
demandEndInfo: '',// demandEndInfo: '',//
outDate: '',// outDate: '',//
options: 2,// options: 2,//
radio: 1, // 1 2
materialType: '1',// materialType: '1',//
status: '',//1 2 status: '',//1 2
// materialld: '',//Id // materialld: '',//Id
@ -269,7 +288,6 @@ export default {
name: "用户名称" name: "用户名称"
}, },
}, },
uniqueListDialogVisible: false, //
uniqueList: [], uniqueList: [],
goodsList: [], goodsList: [],
goodsSelectList: [], goodsSelectList: [],
@ -289,8 +307,11 @@ export default {
const now = new Date() const now = new Date()
const year = now.getFullYear(); const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0'); const day = String(now.getDate()).padStart(2, '0')
return `${year}${month}${day}`; const hour = String(now.getHours()).padStart(2, '0')
const minute = String(now.getMinutes()).padStart(2, '0')
const second = String(now.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hour}:${minute}:${second}`
} }
}, },
mounted() { mounted() {
@ -304,6 +325,9 @@ export default {
this.getMaterialList() this.getMaterialList()
}, },
methods: { methods: {
addInit() {
this.sizeForm.outDate = new Date()//
},
// //
syncInboundQuantity(row) { syncInboundQuantity(row) {
row.theOutboundQuantity = Number(row.theOutboundQuantity); row.theOutboundQuantity = Number(row.theOutboundQuantity);
@ -377,12 +401,12 @@ export default {
}) })
if (res.data && res.data.result) { if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result.duplicateList this.sizeForm.inTableData = res.data.result.uniqueList
const selectedDept = this.departmentList.find( const selectedDept = this.departmentList.find(
dept => dept.departmentId === this.inBatchForm.department dept => dept.departmentId === this.inBatchForm.department
); );
const deptName = selectedDept ? selectedDept.department : ''; const deptName = selectedDept ? selectedDept.department : '';
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({ this.sizeForm.inTableData = res.data.result.uniqueList.map(item => ({
...item, ...item,
IdDemandEndld: this.inBatchForm.batchType, IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department, // department: this.inBatchForm.department,
@ -395,10 +419,14 @@ export default {
if (selectedQuarter) { if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName; this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
} }
if (res.data.result.uniqueList != null && res.data.result.uniqueList.length > 0) { //radio
this.goodsVisible = true if (this.sizeForm.radio === 3) {
this.goodsList = res.data.result.uniqueList if (res.data.result.duplicateList != null && res.data.result.duplicateList.length > 0) {
this.goodsVisible = true
this.goodsList = res.data.result.duplicateList
}
} }
} else { } else {
this.$message.warning('未获取到详细数据'); this.$message.warning('未获取到详细数据');
} }
@ -516,7 +544,6 @@ export default {
try { try {
const res = await editList(this.id); const res = await editList(this.id);
const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {}; const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {};
if (!ldOneOutStorage) { if (!ldOneOutStorage) {
this.$message.error("回显数据异常"); this.$message.error("回显数据异常");
return; return;
@ -534,20 +561,18 @@ export default {
this.sizeForm.inTableData = handledDetailList; this.sizeForm.inTableData = handledDetailList;
} catch (error) { } catch (error) {
console.error("回显失败:", error);
this.$message.error("获取详情数据失败"); this.$message.error("获取详情数据失败");
} }
} }
}, },
addInit() {
this.sizeForm.outDate = new Date()//
},
// //
inTableAdd() { inTableAdd() {
this.sizeForm.inTableData.push({}) this.sizeForm.inTableData.push({})
}, },
// //
async radioChange() { async radioChange() {
// this.resetAllForms()
this.sizeForm.inTableData = [] this.sizeForm.inTableData = []
if (this.sizeForm.options === 1) { if (this.sizeForm.options === 1) {
await this.getQuarterList() await this.getQuarterList()
@ -556,6 +581,7 @@ export default {
} }
}, },
}, },
watch: { watch: {
// //

@ -73,6 +73,7 @@
v-if="approvalProcessShow" v-if="approvalProcessShow"
@closeDialog="closeDialog" @closeDialog="closeDialog"
:approveList="approveList" :approveList="approveList"
:id="id"
></approvalProcessDialog> ></approvalProcessDialog>
</basic-container> </basic-container>
</template> </template>

@ -11,8 +11,9 @@
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<!-- 记录弹窗 -->
<el-dialog title="记录" :visible.sync="dialogLogVisible" width="50%" :close-on-click-modal="false" <el-dialog title="记录" :visible.sync="dialogLogVisible" width="50%" :close-on-click-modal="false"
:append-to-body="true"> :append-to-body="true" >
<el-tabs v-model="transactionType" @tab-click="handleTabClick"> <el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="出库" name="1"></el-tab-pane> <el-tab-pane label="出库" name="1"></el-tab-pane>
<el-tab-pane label="入库" name="2"></el-tab-pane> <el-tab-pane label="入库" name="2"></el-tab-pane>
@ -21,11 +22,11 @@
<el-table-column type="index" width="50"> </el-table-column> <el-table-column type="index" width="50"> </el-table-column>
<el-table-column prop="quantity" label="数量"> <el-table-column prop="quantity" label="数量">
</el-table-column> </el-table-column>
<el-table-column prop="money" label="单价" v-if="transactionType == '2'"> <el-table-column prop="money" label="单价" v-if="transactionType == '2' && row.type == 'YH' ">
</el-table-column> </el-table-column>
<el-table-column prop="operatorName" label="操作人" > <el-table-column prop="operatorName" label="操作人" >
</el-table-column> </el-table-column>
<el-table-column prop="operationTime" label="时间" :formatter="formatTime"> <el-table-column prop="operationTime" label="时间" :formatter="formatTime" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column> <el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table> </el-table>
@ -34,11 +35,7 @@
</template> </template>
<script> <script>
// import { getList, remove } from "@/api/report/report";
import { getList, recordList } from "@/api/firstOrder/list"; import { getList, recordList } from "@/api/firstOrder/list";
import { mapGetters } from "vuex";
export default { export default {
data() { data() {
return { return {
@ -161,7 +158,6 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() { permissionList() {
return { return {
addBtn: false, addBtn: false,

@ -102,6 +102,13 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
}, },
{
label: "出库类型",
prop: "outType",
width: 140,
headerAlign: "center",
align: "center",
},
{ {
label: "出库日期", label: "出库日期",
prop: "outDate", prop: "outDate",

@ -3,17 +3,17 @@
<basic-container> <basic-container>
<avue-crud :option="option" v-model="form" :data="data" @row-del="rowDel" @on-load="onLoad" <avue-crud :option="option" v-model="form" :data="data" @row-del="rowDel" @on-load="onLoad"
:table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" :table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
@search-reset="searchReset" :page.sync="page"></avue-crud> @search-reset="searchReset" :page.sync="page">
</avue-crud>
</basic-container> </basic-container>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import { getList, add, remove, update, getCode } from "@/api/materials/list"; import { getList, add, remove, update, getCode } from "@/api/materials/list";
export default { export default {
data() { data() {
return { return {
form: {}, form: {imageUrl: ""},
selectionList: [], selectionList: [],
query: {}, query: {},
loading: true, loading: true,
@ -95,6 +95,27 @@ export default {
return value; return value;
} }
}, },
{
label: '图片',
prop: 'picture',
type: 'upload',
multiple: true,
headerAlign: "center",
align: "center",
span: 12,
propsHttp: { //
// url: 'picture', //
// name: 'name', //
// res: 'data' //
},
formatter: (row, column) => {
const value = row.picture;
if (value === null || value === undefined || value === "") {
return "无"
}
return value;
}
},
], ],
}, },
data: [], data: [],
@ -103,24 +124,6 @@ export default {
tableData: [], tableData: [],
}; };
}, },
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: false,
editBtn: false,
};
},
ids() {
let ids = [];
this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
},
},
mounted() { mounted() {
this.tableData = this.ckTable; this.tableData = this.ckTable;
this.fetchMaterialCode(); this.fetchMaterialCode();
@ -188,14 +191,7 @@ export default {
}, },
// //
rowSave(row, done, loading) { rowSave(row, done, loading) {
// const submitData = {
// ...row,
// code: row.materialCode,
// materialCode: undefined
// };
// console.log(submitData,'submitData')
add(row).then( add(row).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@ -215,7 +211,6 @@ export default {
update(row).then( update(row).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!", message: "操作成功!",
@ -228,7 +223,6 @@ export default {
} }
); );
}, },
// //
rowDel(row, index, done) { rowDel(row, index, done) {
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {

@ -15,19 +15,10 @@
:description="item.time || ''" :description="item.time || ''"
></el-step> ></el-step>
</el-steps> </el-steps>
<!-- <span slot="footer" class="dialog-footer">
<el-button @click="handleCloseDetail()"> </el-button>
</span> -->
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {
getAllQuarter,
getPurchasesByIds,
getMaterialList,
getDetailList,
} from "@/api/firstOrder/inbound";
export default { export default {
props: { props: {
showDialog: { showDialog: {
@ -79,7 +70,7 @@ export default {
.teps-con{ .teps-con{
margin:0 auto 0 margin:0 auto 0
} }
:deep(.el-dialog__body) { // :deep(.el-dialog__body) {
height: 300px; // height: 300px;
} // }
</style> </style>

@ -1,66 +1,35 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
:option="option" :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
:table-loading="loading" @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@search-change="searchChange"
@search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menuLeft"> <template slot-scope="scope" slot="menuLeft">
<el-button size="small" @click.stop="handleDesign()" type="primary" <el-button size="small" @click.stop="handleDesign()" type="primary">新增出库单
>新增出库单
</el-button> </el-button>
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" @click.stop="approvalProcessFn(scope.row)" <el-button type="text" @click.stop="approvalProcessFn(scope.row)">审批流程</el-button>
>审批流程</el-button
>
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button> <el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button>
</template> </template>
<template slot-scope="scope" slot="xuqiudanmingcheng"> <template slot-scope="scope" slot="xuqiudanmingcheng">
<el-button <el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.xuqiudanmingcheng != ''">{{
type="text" scope.row.xuqiudanmingcheng }}</el-button>
@click.stop="purchaseFn(scope.row)"
v-if="scope.row.xuqiudanmingcheng != ''"
>{{ scope.row.xuqiudanmingcheng }}</el-button
>
<span v-else></span> <span v-else></span>
</template> </template>
</avue-crud> </avue-crud>
<outDialog <outDialog v-if="outDialogVisible" :repairVisible="outDialogVisible" :outDialogTiltle="outDialogTiltle"
v-if="outDialogVisible" :outDialogType="outDialogType" @handleCloseDetail="handleCloseDetail" type="二级库">
:repairVisible="outDialogVisible"
:outDialogTiltle="outDialogTiltle"
:outDialogType="outDialogType"
@handleCloseDetail="handleCloseDetail"
type="二级库"
>
</outDialog> </outDialog>
<!-- 需求单明细 --> <!-- 需求单明细 -->
<needDialog <needDialog :showDialog="purchaseOpen" v-if="purchaseOpen" @closeDialog="closeDialog"
:showDialog="purchaseOpen" :purchaseTitle="purchaseTitle">
v-if="purchaseOpen" </needDialog>
@closeDialog="closeDialog"
:purchaseTitle="purchaseTitle"
></needDialog>
<!-- 审批流程 --> <!-- 审批流程 -->
<approvalProcessDialog <approvalProcessDialog :showDialog="approvalProcessShow" v-if="approvalProcessShow" @closeDialog="closeDialog">
:showDialog="approvalProcessShow" </approvalProcessDialog>
v-if="approvalProcessShow"
@closeDialog="closeDialog"
></approvalProcessDialog>
</basic-container> </basic-container>
</template> </template>
@ -120,7 +89,7 @@ export default {
menuAlign: "left", menuAlign: "left",
searchMenuPosition: "right", searchMenuPosition: "right",
excelBtn: true, excelBtn: true,
menuWidth:140, menuWidth: 140,
column: [ column: [
// { // {
// label: "", // label: "",
@ -169,7 +138,7 @@ export default {
dicData: [ dicData: [
{ {
label: "未出库", label: "未出库",
value:0, value: 0,
}, },
{ {
label: "已出库", label: "已出库",
@ -187,7 +156,7 @@ export default {
outDialogVisible: false, outDialogVisible: false,
outDialogTiltle: "出库", outDialogTiltle: "出库",
outDialogType: "", outDialogType: "",
approvalProcessShow:false, approvalProcessShow: false,
}; };
}, },
@ -195,13 +164,13 @@ export default {
approvalProcessFn(row) { approvalProcessFn(row) {
this.approvalProcessShow = true; this.approvalProcessShow = true;
}, },
// //
handleDetails(row) { handleDetails(row) {
this.outDialogVisible = true this.outDialogVisible = true
this.outDialogType = 'details' this.outDialogType = 'details'
this.outDialogTiltle = '详情' this.outDialogTiltle = '详情'
this.id = row.id this.id = row.id
console.log(this.id,'id') console.log(this.id, 'id')
}, },
purchaseFn(row) { purchaseFn(row) {
this.purchaseOpen = true; this.purchaseOpen = true;

Loading…
Cancel
Save