|
@@ -73,7 +73,7 @@
|
|
|
:value="dict.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<!-- <el-form-item label="" prop="responsibilityUnit">
|
|
|
<el-input
|
|
|
v-model="queryParams.responsibilityUnit"
|
|
@@ -91,7 +91,7 @@
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<!-- <el-form-item label="出库数量" prop="putOut">
|
|
|
<el-input
|
|
|
v-model="queryParams.putOut"
|
|
@@ -226,7 +226,7 @@
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item>
|
|
|
<el-button size="btr" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
@@ -241,8 +241,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['materialManagement:distribution:add']"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
+ >新增</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -253,8 +252,7 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['materialManagement:distribution:edit']"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
+ >修改</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -265,8 +263,7 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['materialManagement:distribution:remove']"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -279,11 +276,11 @@
|
|
|
v-hasPermi="['materialManagement:distribution:export']"
|
|
|
>导出</el-button
|
|
|
>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<!-- <right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
|
- ></right-toolbar> -->
|
|
|
+ ></right-toolbar>-->
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
@@ -295,9 +292,11 @@
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="序号" align="center">
|
|
|
<template scope="scope">
|
|
|
- <span>{{
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
|
|
- }}</span>
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="物品类别" align="center" prop="wuPinType">
|
|
@@ -307,86 +306,54 @@
|
|
|
:value="scope.row.wuPinType"
|
|
|
/>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>-->
|
|
|
<el-table-column label="物品名称" align="center" prop="name" />
|
|
|
- <el-table-column
|
|
|
- label="物品规格"
|
|
|
- align="center"
|
|
|
- prop="materialSpecification"
|
|
|
- />
|
|
|
+ <el-table-column label="条形码编号" align="center" prop="barcode" />
|
|
|
+ <el-table-column label="物品规格" align="center" prop="materialSpecification" />
|
|
|
<el-table-column label="物品型号" align="center" prop="materialXh" />
|
|
|
<el-table-column label="营具类型" align="center" prop="yingJuType">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag
|
|
|
- :options="dict.type.camp_equipment"
|
|
|
- :value="scope.row.yingJuType"
|
|
|
- />
|
|
|
- </template>
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.camp_equipment" :value="scope.row.yingJuType" />
|
|
|
+ </template>-->
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column
|
|
|
label="责任单位"
|
|
|
align="center"
|
|
|
prop="responsibilityUnit"
|
|
|
- /> -->
|
|
|
+ />-->
|
|
|
<el-table-column label="出库数量" align="center" prop="putOut" />
|
|
|
<el-table-column label="价值" align="center" prop="price" />
|
|
|
- <el-table-column
|
|
|
- label="发放时间"
|
|
|
- align="center"
|
|
|
- prop="putOutTime"
|
|
|
- width="120"
|
|
|
- >
|
|
|
+ <el-table-column label="发放时间" align="center" prop="putOutTime" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.putOutTime, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="发放单位"
|
|
|
- align="center"
|
|
|
- prop="responsibilityUnit"
|
|
|
- width="150px"
|
|
|
- />
|
|
|
- <el-table-column label="发放对象" align="center" prop="outPeople">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="接收单位"
|
|
|
- align="center"
|
|
|
- prop="outUnit"
|
|
|
- width="150px"
|
|
|
- />
|
|
|
+ <el-table-column label="发放单位" align="center" prop="responsibilityUnit" width="150px" />
|
|
|
+ <el-table-column label="发放对象" align="center" prop="outPeople"></el-table-column>
|
|
|
+ <el-table-column label="接收单位" align="center" prop="outUnit" width="150px" />
|
|
|
<el-table-column label="接收人" align="center" prop="recipient" />
|
|
|
<el-table-column label="存放位置" align="center" prop="storageLocation" />
|
|
|
<!-- <el-table-column label="备注" align="center" prop="remark" /> -->
|
|
|
<el-table-column label="库房" align="center" prop="warehouse">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag
|
|
|
- :options="dict.type.storage_room"
|
|
|
- :value="scope.row.warehouse"
|
|
|
- />
|
|
|
+ <dict-tag :options="dict.type.storage_room" :value="scope.row.warehouse" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="库存数量" align="center" prop="total" />
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- width="120"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="btu"
|
|
|
type="text"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['materialManagement:distribution:edit']"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
+ >修改</el-button>
|
|
|
<el-button
|
|
|
size="btd"
|
|
|
type="text"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['materialManagement:distribution:remove']"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -407,14 +374,11 @@
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <div class="jiben">基本信息</div>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- :rules="rules"
|
|
|
- label-width="80px"
|
|
|
- :inline="true"
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
|
|
+ <el-form-item label="条形码编号" prop>
|
|
|
+ <el-input v-model="form.barcode" @blur="barcodefun" placeholder="请输入条形码编号" />
|
|
|
+ </el-form-item>
|
|
|
+ <div class="jiben">基本信息</div>
|
|
|
<el-form-item label="物品类别" prop="wuPinType">
|
|
|
<el-select v-model="form.wuPinType" placeholder="请选择物品类别">
|
|
|
<el-option
|
|
@@ -434,23 +398,14 @@
|
|
|
:label="item.names"
|
|
|
class="input_xiala"
|
|
|
@click.native="wuPing(item)"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="物品规格" prop="materialSpecification">
|
|
|
- <el-input
|
|
|
- v-model="form.materialSpecification"
|
|
|
- placeholder="请输入物品规格"
|
|
|
- readonly
|
|
|
- />
|
|
|
+ <el-input v-model="form.materialSpecification" placeholder="请输入物品规格" readonly />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="物品型号" prop="materialXh">
|
|
|
- <el-input
|
|
|
- v-model="form.materialXh"
|
|
|
- placeholder="请输入物资型号"
|
|
|
- readonly
|
|
|
- />
|
|
|
+ <el-input v-model="form.materialXh" placeholder="请输入物资型号" readonly />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="库房" prop="warehouse">
|
|
|
<el-select v-model="form.warehouse" placeholder="请选择库房">
|
|
@@ -463,25 +418,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="存放位置" prop="storageLocation">
|
|
|
- <el-input
|
|
|
- v-model="form.storageLocation"
|
|
|
- placeholder="请输入存放位置"
|
|
|
- />
|
|
|
+ <el-input v-model="form.storageLocation" placeholder="请输入存放位置" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="现有数量" prop="total">
|
|
|
- <el-input
|
|
|
- v-model="form.total"
|
|
|
- placeholder="请输入现有数量"
|
|
|
- readonly
|
|
|
- />
|
|
|
+ <el-input v-model="form.total" placeholder="请输入现有数量" readonly />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="出库数量" prop="putOut">
|
|
|
- <el-input
|
|
|
- v-model="form.putOut"
|
|
|
- placeholder="请输入出库数量"
|
|
|
- @blur="shuLiang"
|
|
|
- />
|
|
|
+ <el-input v-model="form.putOut" placeholder="请输入出库数量" @blur="shuLiang" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="发放时间" prop="putOutTime">
|
|
@@ -492,8 +436,7 @@
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择发放时间"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="营具类型" prop="yingJuType">
|
|
|
<el-select v-model="form.yingJuType" placeholder="请选择营具类型">
|
|
@@ -523,19 +466,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="接收人" prop="recipient" v-if="ren">
|
|
|
- <el-select
|
|
|
- v-model="form.recipient"
|
|
|
- placeholder="请选择接收人"
|
|
|
- @change="rens"
|
|
|
- >
|
|
|
+ <el-select v-model="form.recipient" placeholder="请选择接收人" @change="rens">
|
|
|
<el-option
|
|
|
v-for="item in renYuan"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item"
|
|
|
class="input_xiala"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="接收单位" prop="outUnitId" v-if="danWei">
|
|
@@ -547,12 +485,8 @@
|
|
|
></treeselect>
|
|
|
</el-form-item>
|
|
|
<div class="jiben">备注</div>
|
|
|
- <el-form-item label="" prop="remark">
|
|
|
- <el-input
|
|
|
- v-model="form.remark"
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入内容"
|
|
|
- />
|
|
|
+ <el-form-item label prop="remark">
|
|
|
+ <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- <el-form-item label="责任单位" prop="responsibilityUnit">
|
|
@@ -563,10 +497,10 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="责任人" prop="personLiable">
|
|
|
<el-input v-model="form.personLiable" placeholder="请输入责任人" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="创建人" prop="createName">
|
|
|
<el-input v-model="form.createName" placeholder="请输入创建人" />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="购买时间" prop="buyingTime">
|
|
|
<el-date-picker
|
|
|
clearable
|
|
@@ -586,7 +520,7 @@
|
|
|
v-model="form.registrationId"
|
|
|
placeholder="请输入入库表id"
|
|
|
/>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -605,16 +539,17 @@ import {
|
|
|
updateDistribution,
|
|
|
exportDistribution,
|
|
|
exportMaterialRegWuPingList,
|
|
|
- treeselect,
|
|
|
+ treeselect
|
|
|
} from "@/api/materialManagement/distribution";
|
|
|
// 导入树形结构
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { getZhuChiRen } from "@/api/materialManagement/archives";
|
|
|
+import { getBarCode } from "@/api/materialManagement/materialRegistration";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- Treeselect,
|
|
|
+ Treeselect
|
|
|
},
|
|
|
name: "Distribution",
|
|
|
dicts: ["category", "camp_equipment", "storage_room", "distribution_object"],
|
|
@@ -663,7 +598,7 @@ export default {
|
|
|
outUnit: null,
|
|
|
outPeople: null,
|
|
|
recipient: null,
|
|
|
- registrationId: null,
|
|
|
+ registrationId: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -671,12 +606,10 @@ export default {
|
|
|
rules: {
|
|
|
name: [{ required: true, message: "请选择物品名称", trigger: "blur" }],
|
|
|
yingJuType: [
|
|
|
- { required: true, message: "请选择营具类型", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择营具类型", trigger: "blur" }
|
|
|
],
|
|
|
warehouse: [{ required: true, message: "请选择库房", trigger: "blur" }],
|
|
|
- putOut:[
|
|
|
- { required: true, message: "请输入出库数量", trigger: "blur" }
|
|
|
- ]
|
|
|
+ putOut: [{ required: true, message: "请输入出库数量", trigger: "blur" }]
|
|
|
},
|
|
|
// 获取物品名称列表
|
|
|
itemlist: [],
|
|
@@ -689,17 +622,29 @@ export default {
|
|
|
// 人员列表
|
|
|
renYuan: [],
|
|
|
// 总数量
|
|
|
- yinJunShu: "",
|
|
|
+ yinJunShu: ""
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //条形码获取
|
|
|
+ barcodefun() {
|
|
|
+ getBarCode({ barcode: this.form.barcode }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.form = res.data;
|
|
|
+ this.form.archivesId = res.data.id;
|
|
|
+ this.form.total = res.data.materialInventory;
|
|
|
+ this.form.price = res.data.price;
|
|
|
+ this.form.id = null;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 数量的判断
|
|
|
shuLiang() {
|
|
|
- if (this.form.putOut > this.yinJunShu) {
|
|
|
- return this.$modal.msgWarning(`库存数量为${this.yinJunShu}`);
|
|
|
+ if (this.form.putOut > this.form.total) {
|
|
|
+ return this.$modal.msgWarning(`库存数量为${this.form.total}`);
|
|
|
}
|
|
|
},
|
|
|
// 点击接收单位触发
|
|
@@ -732,13 +677,13 @@ export default {
|
|
|
},
|
|
|
// 获取人员
|
|
|
getRenYuan(id) {
|
|
|
- getZhuChiRen(id).then((res) => {
|
|
|
+ getZhuChiRen(id).then(res => {
|
|
|
this.renYuan = res.data;
|
|
|
});
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getTreeselect() {
|
|
|
- treeselect().then((response) => {
|
|
|
+ treeselect().then(response => {
|
|
|
this.deptOptions = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -757,14 +702,14 @@ export default {
|
|
|
},
|
|
|
// 获取物品名称
|
|
|
getMingCheng() {
|
|
|
- exportMaterialRegWuPingList().then((response) => {
|
|
|
+ exportMaterialRegWuPingList().then(response => {
|
|
|
this.itemlist = response.rows;
|
|
|
});
|
|
|
},
|
|
|
/** 查询物资发放列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listDistribution(this.queryParams).then((response) => {
|
|
|
+ listDistribution(this.queryParams).then(response => {
|
|
|
this.distributionList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -800,7 +745,7 @@ export default {
|
|
|
outUnit: null,
|
|
|
outPeople: null,
|
|
|
recipient: null,
|
|
|
- registrationId: null,
|
|
|
+ registrationId: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -816,7 +761,7 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
+ this.ids = selection.map(item => item.id);
|
|
|
this.single = selection.length !== 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
@@ -841,7 +786,7 @@ export default {
|
|
|
this.ren = true;
|
|
|
this.danWei = false;
|
|
|
}
|
|
|
- getDistribution(id).then((response) => {
|
|
|
+ getDistribution(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.getRenYuan(this.form.responsibilityUnitId);
|
|
|
this.open = true;
|
|
@@ -850,19 +795,20 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+ console.log(this.form.id);
|
|
|
if (this.form.id != null) {
|
|
|
- updateDistribution(this.form).then((response) => {
|
|
|
+ updateDistribution(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- if (this.form.putOut > this.yinJunShu) {
|
|
|
+ if (this.form.putOut > this.form.total) {
|
|
|
return;
|
|
|
}
|
|
|
- addDistribution(this.form).then((response) => {
|
|
|
+ addDistribution(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -876,7 +822,7 @@ export default {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
.confirm('是否确认删除物资发放编号为"' + ids + '"的数据项?')
|
|
|
- .then(function () {
|
|
|
+ .then(function() {
|
|
|
return delDistribution(ids);
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -894,13 +840,13 @@ export default {
|
|
|
this.exportLoading = true;
|
|
|
return exportDistribution(queryParams);
|
|
|
})
|
|
|
- .then((response) => {
|
|
|
+ .then(response => {
|
|
|
this.$download.name(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
@@ -962,4 +908,4 @@ export default {
|
|
|
::v-deep .vue-treeselect__single-value {
|
|
|
color: #fff !important;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|