Compare commits

...

3 Commits

  1. 110
      src/views/firstOrder/components/outDialog.vue
  2. 66
      src/views/firstOrder/inbound.vue
  3. 31
      src/views/firstOrder/outbound.vue

@ -132,10 +132,8 @@
</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-form>
<span slot="footer" class="dialog-footer">
@ -176,6 +174,44 @@
<el-button type="primary" @click="batchSubmit()"> </el-button>
</span>
</el-dialog>
<!-- 耐用品选择弹窗 -->
<el-dialog :close-on-click-modal="false" title="选择耐用品" :visible.sync="goodsVisible" :append-to-body="true"
width="40%" @selection-change="goodsListSelectionChange">
<el-table :data="goodsList" border style="width: 100%">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="materialCode" label="物资编码">
</el-table-column>
<el-table-column prop="materialName" label="物资名称">
</el-table-column>
<el-table-column prop="model" label="规格">
</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>
<el-table-column prop="departmentName" label="部门">
</el-table-column>
<el-table-column prop="applicationQuantity" label="申请数量">
</el-table-column>
<el-table-column prop="outboundQuantity" label="已出库数量">
</el-table-column>
<el-table-column prop="theInboundQuantity" label="本次入库数量">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.theInboundQuantity" :min="1" style="width: 100%;"
@change="syncInboundQuantity(scope.row)" :disabled="outDialogType == 'details'"></el-input-number>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="goodsVisible = false"> </el-button>
<el-button type="primary" @click="goodsSubmit()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
@ -205,6 +241,7 @@ export default {
},
data() {
return {
goodsVisible: false,
quarterList: [],
departmentList: [],
outDialogVisible: false,
@ -227,6 +264,8 @@ export default {
},
uniqueListDialogVisible: false, //
uniqueList: [],
goodsList: [],
goodsSelectList: [],
inTableData: [],
inBatchDialogVisible: false,//
batchType: '',//
@ -325,33 +364,48 @@ export default {
this.$message.error('请选择部门');
return;
}
const res = await getDetailedList({
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department
})
if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result.duplicateList
const selectedDept = this.departmentList.find(
dept => dept.departmentId === this.inBatchForm.department
);
const deptName = selectedDept ? selectedDept.department : '';
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department,
department: deptName
}));
this.inBatchDialogVisible = false;
const selectedQuarter = this.quarterList.find(
item => item.ids === this.inBatchForm.batchType
)
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
} else {
this.$message.warning('未获取到详细数据');
const res = await getDetailedList({
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department
})
if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result.duplicateList
const selectedDept = this.departmentList.find(
dept => dept.departmentId === this.inBatchForm.department
);
const deptName = selectedDept ? selectedDept.department : '';
this.sizeForm.inTableData = res.data.result.duplicateList.map(item => ({
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department,
department: deptName
}));
this.inBatchDialogVisible = false;
const selectedQuarter = this.quarterList.find(
item => item.ids === this.inBatchForm.batchType
)
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
if(res.data.result.abc != null && res.data.result.abc.length > 0){
this.data.goodsVisible = true
this.data.goodsList = res.data.result.abc
}
} else {
this.$message.warning('未获取到详细数据');
}
},
//
goodsListSelectionChange(val){
this.goodsSelectList = val
},
//
goodsSubmit(){
this.data.goodsVisible = false
this.sizeForm.inTableData.push(this.goodsSelectList)
},
//
async getDetailedItems() {

@ -134,16 +134,33 @@ export default {
{
label: "采购单名称",
prop: "purchaseEndInfo",
<<<<<<< HEAD
width: 150,
align: "center",
formatter: (row, column) => {
const value = row.purchaseEndInfo;
if (value === null || value === undefined || value === "") {
return "无"; //
}
return value; //
}
=======
width: 180,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "入库单号",
prop: "orderNo",
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 110,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "入库日期",
@ -153,11 +170,18 @@ export default {
searchRange: true,
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
<<<<<<< HEAD
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
width: 160,
align: "center"
=======
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
width: 140,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -165,28 +189,53 @@ export default {
label: "入库人",
prop: "inOperatorName",
search: true,
<<<<<<< HEAD
searchParam: 'inOperator',
align: "center"
=======
searchParam: "inOperator",
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "来源",
prop: "source",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "事由",
prop: "reason",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "物资类型",
prop: "materialType",
search: false,
<<<<<<< HEAD
type: 'select',
align: "center",
dicData: [{
label: '办公物资',
value: '1'
},
{
label: '其他物资',
value: '2'
}]
=======
type: "select",
headerAlign: "center",
align: "center",
@ -200,18 +249,27 @@ export default {
value: "2",
},
],
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "审批人员",
prop: "approvers",
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "状态",
prop: "status",
<<<<<<< HEAD
type: 'select',
=======
type: "select",
headerAlign: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
align: "center",
dicData: [
{
@ -252,11 +310,19 @@ export default {
},
//
handleDetails(row) {
<<<<<<< HEAD
this.inDialogVisible = true
this.inDialogType = 'details'
this.inDialogTiltle = '详情'
this.id = row.id
console.log(this.id, 'id')
=======
this.inDialogVisible = true;
this.inDialogType = "details";
this.inDialogTiltle = "详情";
this.id = row.id;
console.log(this.id, "id");
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
//
handleEdit(row) {

@ -86,16 +86,26 @@ export default {
{
label: "需求单名称",
prop: "demandEndInfo",
<<<<<<< HEAD
width: 150,
align: "center"
=======
width: 180,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库单号",
prop: "orderNo",
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 110,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库日期",
@ -107,9 +117,14 @@ export default {
endPlaceholder: "结束时间",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
<<<<<<< HEAD
width: 160,
align: "center"
=======
width: 140,
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
// searchParam: 'startTime',
// searchEndParam: 'endTime'
},
@ -117,15 +132,22 @@ export default {
label: "事由",
prop: "reason",
search: false,
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "物资类型",
prop: "materialType",
search: false,
type: 'select',
<<<<<<< HEAD
=======
headerAlign: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
align: "center",
dicData: [{
label: '办公物资',
@ -139,16 +161,25 @@ export default {
{
label: "部门",
prop: "department",
<<<<<<< HEAD
align: "center"
=======
headerAlign: "center",
align: "center",
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
{
label: "出库人",
prop: "shipperName",
search: true,
<<<<<<< HEAD
searchParam: 'inOperator',
align: "center"
=======
headerAlign: "center",
align: "center",
searchParam: 'inOperator'
>>>>>>> 8b1ca70a0fedc4bfbcc6caa65f87be7eec4bd817
},
// {

Loading…
Cancel
Save