代码提交

master
taozi 4 months ago
commit 45df7a937c
  1. 2
      src/api/secondOrder/outbound.js
  2. 6
      src/views/materials/expend.vue
  3. 50
      src/views/secondOrder/components/approvalProcessDialog.vue
  4. 121
      src/views/secondOrder/components/outDialog.vue
  5. 2
      src/views/secondOrder/list.vue
  6. 99
      src/views/secondOrder/outbound.vue

@ -50,7 +50,7 @@ export const submit = data => {
// 获取详情
export const getDetails = params => {
return request({
url: '/smartpark/user/getUserByDeptId',
url: '/smartpark/twoOutStorage/detail',
method: 'get',
params: params,

@ -104,7 +104,7 @@ export default {
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
menuWidth: 140,
menuWidth: 100,
column: [
{
label: "编号",
@ -189,8 +189,8 @@ export default {
prop: "isBorrow",
headerAlign: "center",
align: "center",
type: "select",
dicDta: [
type: "select",
dicData: [
{
label: "已借出",
value: "0",

@ -11,49 +11,61 @@
<el-steps class="teps-con" direction="vertical" :active="1">
<el-step
v-for="(item, index) in approvalList"
:title="item.name"
:description="item.time || ''"
:title="item.userName"
:description="item.optTime || ''"
></el-step>
</el-steps>
</el-dialog>
</div>
</template>
<script>
import { getDetails } from "@/api/secondOrder/outbound";
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
rowData: {
type: Object,
default: {},
},
},
data() {
return {
inDialogVisible: false,
inDialogTiltle: "审批流程",
approvalList: [
{
name: "张三",
time: "2021-01-01 10:10:10",
status: "通过",
},
{
name: "张三1",
time: "",
status: "待审核",
},
{
name: "张三3",
time: "",
status: "待审核",
},
// {
// name: "",
// time: "2021-01-01 10:10:10",
// status: "",
// },
// {
// name: "1",
// time: "",
// status: "",
// },
// {
// name: "3",
// time: "",
// status: "",
// },
],
};
},
mounted() {
this.inDialogVisible = this.showDialog;
this.inInit();
},
methods: {
inInit() {
getDetails({ twoOutStorageId: this.rowData.id }).then((res) => {
console.log(9999, res);
this.approvalList = res.data.result.approveList;
});
},
handleCloseDetail() {
this.inDialogVisible = false;
this.$emit("closeDialog");
@ -67,8 +79,8 @@ export default {
font-weight: 600;
padding: 18px 0;
}
.teps-con{
margin:0 auto 0
.teps-con {
margin: 0 auto 0;
}
// :deep(.el-dialog__body) {
// height: 300px;

@ -15,7 +15,7 @@
ref="dynamicValidateForm"
label-width="100px"
class="demo-dynamic"
:rules="rules"
:rules="dynamicRules"
>
<div class="form-title">基本信息</div>
<el-row>
@ -83,7 +83,9 @@
v-model="sizeForm.ldTwoOutStorage.proposerInfo"
placeholder="请选择"
style="width: 100%"
:disabled="sizeForm.departmentId == ''"
:disabled="
sizeForm.departmentId == '' || outDialogType == 'details'
"
clearable
filterable
value-key="userId"
@ -102,7 +104,7 @@
<el-col :span="12" v-if="outDialogType == 'details'">
<el-form-item label="填报人">
<el-input
v-model="sizeForm.ldTwoOutStorage.submitName"
v-model="sizeForm.ldTwoOutStorage.shipperName"
:disabled="outDialogType != 'add'"
></el-input>
</el-form-item>
@ -114,6 +116,7 @@
size="mini"
style="margin-bottom: 18px"
@click="inTableAdd()"
v-if="outDialogType != 'details'"
>新增</el-button
>
<el-table
@ -157,44 +160,35 @@
:min="1"
style="width: 100%"
:disabled="outDialogType != 'add'"
@change="(newValue) => handleQuantityChange(newValue, scope.$index)"
></el-input-number>
</template>
</el-table-column>
</el-table>
<div class="form-title">出库账目表格</div>
<div class="form-title" v-if="outDialogType != 'details'">
出库账目表格
</div>
<el-table
:data="sizeForm.inAccountsTableData"
border
style="width: 100%"
v-if="outDialogType != 'details'"
>
<el-table-column prop="date" label="当前库存">
<el-table-column prop="str1" label="编码"> </el-table-column>
<el-table-column prop="str2" label="名称">
<template slot-scope="scope">
<el-select
v-model="sizeForm.type"
placeholder="请选择"
style="width: 100%"
:disabled="outDialogType != 'add'"
>
<el-option label="办公室物资" value="1"></el-option>
<el-option label="其他物资" value="2"></el-option>
</el-select>
</template>
<el-table-column prop="materialCode" label="编码">
</el-table-column>
<el-table-column prop="materialName" label="名称">
</el-table-column>
<el-table-column prop="str3" label="规格"> </el-table-column>
<el-table-column prop="str4" label="类别"> </el-table-column>
<el-table-column prop="str5" label="单位"> </el-table-column>
<el-table-column prop="str6" label="数量"> </el-table-column>
<el-table-column prop="num" label="单价"> </el-table-column>
<el-table-column prop="model" label="规格"> </el-table-column>
<el-table-column prop="type" label="类别"> </el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="oldNum" label="数量"> </el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库信息">
<el-table-column prop="str8" label="数量"> </el-table-column>
<el-table-column prop="str9" label="单价"> </el-table-column>
<el-table-column prop="num" label="数量"> </el-table-column>
</el-table-column>
<el-table-column prop="date" label="出库后库存">
<el-table-column prop="str10" label="数量"> </el-table-column>
<el-table-column prop="str11" label="单价"> </el-table-column>
<el-table-column prop="newNum" label="数量"> </el-table-column>
</el-table-column>
</el-table>
</el-form>
@ -202,7 +196,12 @@
<span slot="footer" class="dialog-footer">
<el-button @click="handleCloseDetail()"> </el-button>
<el-button type="primary" @click="sumbit()"> </el-button>
<el-button
v-if="outDialogType != 'details'"
type="primary"
@click="sumbit()"
> </el-button
>
</span>
</el-dialog>
</div>
@ -213,6 +212,7 @@ import {
getUserList,
getMaterialList,
submit,
getDetails,
} from "@/api/secondOrder/outbound";
export default {
props: {
@ -232,6 +232,10 @@ export default {
type: String,
default: "",
},
rowData: {
type: Object,
default: {},
},
},
computed: {
outDateInfo() {
@ -242,6 +246,18 @@ export default {
return `${year}${month}${day}`;
},
},
watch: {
outDialogType: {
immediate: true,
handler(newVal) {
if (newVal === "details") {
this.dynamicRules = {}; //
} else {
this.dynamicRules = this.rules; //
}
},
},
},
data() {
return {
outDialogVisible: false,
@ -305,6 +321,7 @@ export default {
materials: [], //
userOptions: [], //
departmentOptions: [], //
dynamicRules: {}, //
};
},
mounted() {
@ -318,6 +335,24 @@ export default {
this.getDetailedItems();
},
methods: {
// inAccountsTableData
summaryTableData() {
this.sizeForm.inAccountsTableData = JSON.parse(JSON.stringify(this.sizeForm.ldTwoOutStorageDetailList))
},
handleQuantityChange(newValue, index) {
const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index];
if (currentRow.materialCode != '') {
currentRow.oldNum = currentRow.materialitem.num
currentRow.num = currentRow.num
currentRow.newNum = currentRow.materialitem.num - currentRow.num
}
this.$set(this.sizeForm.inAccountsTableData,index,currentRow)
this.sizeForm.inAccountsTableData[index] = currentRow
},
//
updateGlobalTotal() {
let totalAmount = 0;
},
//
async getMaterialList(value) {
getMaterialList({ departmentId: value }).then((res) => {
@ -326,6 +361,7 @@ export default {
},
//
handleMaterialChange(row, index) {
console.log(99999,row)
this.sizeForm.ldTwoOutStorageDetailList[index].materialId =
row.materialId;
this.sizeForm.ldTwoOutStorageDetailList[index].model = row.model;
@ -335,11 +371,20 @@ export default {
row.materialName;
this.sizeForm.ldTwoOutStorageDetailList[index].type = row.type;
this.sizeForm.ldTwoOutStorageDetailList[index].unit = row.unit;
},
//
getUserList(value) {
getUserList({ departmentId: value }).then((res) => {
this.userOptions = res.data.result;
if (this.outDialogType != "add") {
let userArr = this.userOptions.filter(
(item) => item.userId == this.sizeForm.ldTwoOutStorage.proposerId
);
this.sizeForm.ldTwoOutStorage.proposerInfo =
userArr.length > 0 ? userArr[0] : {};
}
});
},
//
@ -358,7 +403,7 @@ export default {
},
//
proposerChange(value) {
console.log('领用人',value);
console.log("领用人", value);
this.sizeForm.ldTwoOutStorage.proposerId = value.userId;
this.sizeForm.ldTwoOutStorage.proposerName = value.name;
},
@ -366,7 +411,24 @@ export default {
this.outDialogVisible = false;
this.$emit("handleCloseDetail");
},
inInit() {},
inInit() {
if (this.outDialogType != "add") {
getDetails({ twoOutStorageId: this.rowData.id }).then((res) => {
this.sizeForm = res.data.result;
this.getUserList(this.sizeForm.ldTwoOutStorage.departmentId);
let departmentArr = this.departmentOptions.filter(
(item) =>
item.departmentId == this.sizeForm.ldTwoOutStorage.departmentId
);
this.sizeForm.ldTwoOutStorage.departmentInfo =
departmentArr.length > 0 ? departmentArr[0] : {};
// this.sizeForm.ldTwoOutStorage.proposerInfo={}
});
}
},
addInit() {
const now = new Date();
@ -382,6 +444,7 @@ export default {
//
inTableAdd() {
this.sizeForm.ldTwoOutStorageDetailList.push({});
this.summaryTableData()
},
//
sumbit() {

@ -78,7 +78,7 @@ export default {
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
menuWidth: 100,
menuWidth: 80,
column: [
{
label: "部门",

@ -8,8 +8,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click.stop="approvalProcessFn(scope.row)">审批流程</el-button>
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button>
<el-button type="text" @click.stop="approvalProcessFn(scope.row)"
>审批流程</el-button
>
<el-button type="text" @click.stop="handleDetails(scope.row)"
>详情</el-button
>
</template>
<template slot-scope="scope" slot="xuqiudanmingcheng">
<el-button type="text" @click.stop="purchaseFn(scope.row)" v-if="scope.row.xuqiudanmingcheng != ''">{{
@ -18,8 +22,15 @@
</template>
</avue-crud>
<outDialog v-if="outDialogVisible" :repairVisible="outDialogVisible" :outDialogTiltle="outDialogTiltle"
:outDialogType="outDialogType" @handleCloseDetail="handleCloseDetail" type="二级库">
<outDialog
v-if="outDialogVisible"
:repairVisible="outDialogVisible"
:outDialogTiltle="outDialogTiltle"
:outDialogType="outDialogType"
:rowData="rowData"
@handleCloseDetail="handleCloseDetail"
type="二级库"
>
</outDialog>
<!-- 需求单明细 -->
@ -28,8 +39,12 @@
</needDialog>
<!-- 审批流程 -->
<approvalProcessDialog :showDialog="approvalProcessShow" v-if="approvalProcessShow" @closeDialog="closeDialog">
</approvalProcessDialog>
<approvalProcessDialog
:showDialog="approvalProcessShow"
v-if="approvalProcessShow"
:rowData="rowData"
@closeDialog="closeDialog"
></approvalProcessDialog>
</basic-container>
</template>
@ -43,7 +58,7 @@ export default {
components: {
outDialog,
needDialog,
approvalProcessDialog
approvalProcessDialog,
},
data() {
return {
@ -91,21 +106,6 @@ export default {
excelBtn: true,
menuWidth: 140,
column: [
// {
// label: "",
// prop: "xuqiudanmingcheng",
// width:180,
// },
{
label: "部门",
prop: "bumen",
headerAlign: "center",
align: "center",
},
// {
// label: "",
// prop: "str1",
// },
{
label: "出库单号",
prop: "orderNo",
@ -120,13 +120,41 @@ export default {
headerAlign: "center",
align: "center",
},
// {
// label: "",
// prop: "approvers",
// headerAlign: "center",
// align: "center",
// },
{
label: "事由",
prop: "reason",
headerAlign: "center",
align: "center",
},
{
label: "物资类型",
prop: "materialType",
headerAlign: "center",
align: "center",
type: "select",
dicData: [
{
label: "办公物资",
value: "1",
},
{
label: "其他物资",
value: "2",
},
],
},
{
label: "部门",
prop: "department",
align: "center",
headerAlign: "center",
},
{
label: "出库人",
prop: "shipperName",
headerAlign: "center",
align: "center",
},
{
label: "状态",
@ -157,20 +185,22 @@ export default {
outDialogTiltle: "出库",
outDialogType: "",
approvalProcessShow: false,
rowData:{},
};
},
methods: {
approvalProcessFn(row) {
this.approvalProcessShow = true;
this.rowData = row
},
//
handleDetails(row) {
this.outDialogVisible = true
this.outDialogType = 'details'
this.outDialogTiltle = '详情'
this.id = row.id
console.log(this.id, 'id')
this.outDialogVisible = true;
this.outDialogType = "details";
this.outDialogTiltle = "详情";
this.rowData = row
},
purchaseFn(row) {
this.purchaseOpen = true;
@ -178,6 +208,7 @@ export default {
},
closeDialog() {
this.purchaseOpen = false;
this.approvalProcessShow = false
},
handleDesign() {
this.outDialogVisible = true;

Loading…
Cancel
Save