zhangdi 3 months ago
commit 70f3342651
  1. 9
      src/api/firstOrder/outbound.js
  2. 7
      src/api/system/menu.js
  3. 9
      src/api/system/role.js
  4. 1
      src/page/index/index.vue
  5. 2
      src/page/index/top/top-menu.vue
  6. 2
      src/store/modules/dict.js
  7. 8
      src/store/modules/user.js
  8. 2
      src/views/authority/apiscope.vue
  9. 2
      src/views/authority/datascope.vue
  10. 231
      src/views/authority/role.vue
  11. 162
      src/views/firstOrder/components/batchSelectionDialog.vue
  12. 71
      src/views/firstOrder/components/consumableDialog.vue
  13. 2
      src/views/firstOrder/components/inDialog.vue
  14. 410
      src/views/firstOrder/components/outDialog.vue
  15. 19
      src/views/firstOrder/list.vue
  16. 81
      src/views/firstOrder/outbound.vue
  17. 1
      src/views/system/dict.vue

@ -39,6 +39,15 @@ export const getDetailedList = (params) => {
cryptoData: false cryptoData: false
}) })
} }
export const batchList = (params) => {
return request({
url: '/smartpark/demandEnd/getDemandEndNyData',
method: 'get',
params: params,
cryptoToken: false,
cryptoData: false
})
}
export const getDetailedItems = () => { export const getDetailedItems = () => {
return request({ return request({
url: '/smartpark/department/getOnePutDepartment', url: '/smartpark/department/getOnePutDepartment',

@ -97,10 +97,11 @@ export const getTopMenu = () => request({
method: 'get' method: 'get'
}); });
export const getRoutes = (topMenuId) => request({ export const getRoutes = (roleId) => request({
url: '/api/blade-system/menu/routes', url: '/smartpark/menu/routes',
method: 'get', method: 'get',
params: { params: {
topMenuId, roleId,
} }
}); });

@ -13,14 +13,15 @@ export const getList = (current, size, params) => {
} }
export const grantTree = () => { export const grantTree = () => {
return request({ return request({
url: '/api/blade-system/menu/grant-tree', url: '/smartpark/menu/grant-tree',
method: 'get', method: 'get',
}) })
} }
export const grant = (roleIds, menuIds, dataScopeIds, apiScopeIds) => { export const grant = (roleIds, menuIds, dataScopeIds, apiScopeIds) => {
return request({ return request({
url: '/api/blade-system/role/grant', url: '/smartpark/role/grant',
method: 'post', method: 'post',
data: { data: {
roleIds, roleIds,
@ -60,7 +61,7 @@ export const update = (row) => {
export const getRole = (roleIds) => { export const getRole = (roleIds) => {
return request({ return request({
url: '/api/blade-system/menu/role-tree-keys', url: '/smartpark/menu/role-tree-keys',
method: 'get', method: 'get',
params: { params: {
roleIds, roleIds,
@ -70,7 +71,7 @@ export const getRole = (roleIds) => {
export const getRoleTree = (tenantId) => { export const getRoleTree = (tenantId) => {
return request({ return request({
url: '/api/blade-system/role/tree', url: '/smartpark/role/tree',
method: 'get', method: 'get',
params: { params: {
tenantId, tenantId,

@ -88,6 +88,7 @@
}, },
// //
openMenu(item = {}) { openMenu(item = {}) {
console.log("itemitemitemopenMenu", item)
this.$store.dispatch("GetMenu", item.id).then(data => { this.$store.dispatch("GetMenu", item.id).then(data => {
if (data.length !== 0) { if (data.length !== 0) {
this.$router.$avueRouter.formatRoutes(data, true); this.$router.$avueRouter.formatRoutes(data, true);

@ -45,12 +45,14 @@
}, },
methods: { methods: {
openHome(itemHome) { openHome(itemHome) {
this.index.openMenu(itemHome); this.index.openMenu(itemHome);
this.$router.push({ this.$router.push({
path: this.$router.$avueRouter.getPath({name: itemHome.name, src: ''}, {}) path: this.$router.$avueRouter.getPath({name: itemHome.name, src: ''}, {})
}); });
}, },
openMenu(item) { openMenu(item) {
console.log("openMenu", item)
this.index.openMenu(item) this.index.openMenu(item)
}, },
getMenu() { getMenu() {

@ -10,7 +10,7 @@ const dict = {
FlowRoutes({commit}) { FlowRoutes({commit}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getDictionary({code: 'flow'}).then(res => { getDictionary({code: 'flow'}).then(res => {
commit('SET_FLOW_ROUTES', res.data.data); commit('SET_FLOW_ROUTES', res.data.result || []);
resolve(); resolve();
}).catch(error => { }).catch(error => {
reject(error) reject(error)

@ -279,10 +279,11 @@ const user = {
}) })
}, },
//获取系统菜单 //获取系统菜单
GetMenu({commit, dispatch}, topMenuId) { GetMenu({ commit, dispatch }, topMenuId) {
return new Promise(resolve => { return new Promise(resolve => {
getRoutes(topMenuId).then((res) => { //传roleId
const data = res.data.data getRoutes().then((res) => {
const data = res.data.result
let menu = deepClone(data); let menu = deepClone(data);
menu.forEach(ele => { menu.forEach(ele => {
addPath(ele, true); addPath(ele, true);
@ -292,6 +293,7 @@ const user = {
dispatch('GetButtons'); dispatch('GetButtons');
resolve(menu) resolve(menu)
}) })
}) })
}, },
//获取系统按钮 //获取系统按钮

@ -506,7 +506,7 @@
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => { getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
this.data = res.data.data; this.data = res.data.result;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); });

@ -552,7 +552,7 @@ export default {
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => { getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
this.data = res.data.data; this.data = res.data.result;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); });

@ -20,7 +20,7 @@
@on-load="onLoad" @on-load="onLoad"
> >
<template slot="menuLeft"> <template slot="menuLeft">
<el-button <!-- <el-button
type="danger" type="danger"
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
@ -28,15 +28,15 @@
plain plain
@click="handleDelete" @click="handleDelete"
> >
</el-button> </el-button> -->
<el-button <!-- <el-button
size="small" size="small"
icon="el-icon-setting" icon="el-icon-setting"
@click="handleRole" @click="handleRole"
v-if="userInfo.role_name.includes('admin')" v-if="userInfo.role_name.includes('admin')"
plain plain
>权限设置 >权限设置
</el-button> </el-button> -->
</template> </template>
<template slot-scope="{ row }" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button <el-button
@ -126,6 +126,7 @@ export default {
label: "title", label: "title",
value: "key", value: "key",
}, },
currentRoleId: null, //ID
menuGrantList: [], menuGrantList: [],
dataScopeGrantList: [], dataScopeGrantList: [],
apiScopeGrantList: [], apiScopeGrantList: [],
@ -152,36 +153,39 @@ export default {
border: true, border: true,
index: true, index: true,
selection: true, selection: true,
viewBtn: true, viewBtn: false,
addBtn: false,
editBtn: false, //
delBtn: false, //
labelWidth: 120, labelWidth: 120,
searchLabelWidth: 120, searchLabelWidth: 120,
menuWidth: 350, menuWidth: 350,
dialogWidth: 600, dialogWidth: 600,
dialogClickModal: false, dialogClickModal: false,
column: [ column: [
{ // {
label: "上级角色", // label: "",
prop: "parentId", // prop: "parentId",
dicData: [], // dicData: [],
type: "tree", // type: "tree",
hide: true, // hide: true,
span: 24, // span: 24,
headerAlign: "center", // headerAlign: "center",
align: "center", // align: "center",
props: { // props: {
label: "title", // label: "title",
}, // },
rules: [ // rules: [
{ // {
required: false, // required: false,
message: "请选择上级角色", // message: "",
trigger: "click", // trigger: "click",
}, // },
], // ],
}, // },
{ {
label: "角色名称", label: "角色名称",
prop: "roleName", prop: "name",
search: true, search: true,
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
@ -194,36 +198,81 @@ export default {
}, },
], ],
}, },
// {
// label: "",
// prop: "tenantId",
// type: "tree",
// dicUrl: "/api/blade-system/tenant/select",
// addDisplay: false,
// editDisplay: false,
// headerAlign: "center",
// align: "center",
// viewDisplay: website.tenantMode,
// span: 24,
// props: {
// label: "tenantName",
// value: "tenantId",
// },
// hide: !website.tenantMode,
// search: website.tenantMode,
// rules: [
// {
// required: true,
// message: "",
// trigger: "click",
// },
// ],
// },
// {
// label: "",
// labelTip:
// ",",
// prop: "roleAlias",
// search: true,
// span: 24,
// headerAlign: "center",
// align: "center",
// rules: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
// },
// {
// label: "",
// labelTip: ",",
// prop: "currentAlias",
// type: "radio",
// dicData: [],
// headerAlign: "center",
// align: "center",
// props: {
// label: "roleName",
// value: "roleAlias",
// },
// hide: true,
// span: 24,
// },
// {
// label: "",
// prop: "sort",
// type: "number",
// headerAlign: "center",
// align: "center",
// span: 24,
// rules: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
// },
{ {
label: "所属租户", label: "角色编码",
prop: "tenantId", prop: "code",
type: "tree",
dicUrl: "/api/blade-system/tenant/select",
addDisplay: false,
editDisplay: false,
headerAlign: "center",
align: "center",
viewDisplay: website.tenantMode,
span: 24,
props: {
label: "tenantName",
value: "tenantId",
},
hide: !website.tenantMode,
search: website.tenantMode,
rules: [
{
required: true,
message: "请输入所属租户",
trigger: "click",
},
],
},
{
label: "角色别名",
labelTip:
"用于权限校验与标注的属性,可手动录入也可点击现有别名快速录入",
prop: "roleAlias",
search: true, search: true,
span: 24, span: 24,
headerAlign: "center", headerAlign: "center",
@ -231,37 +280,7 @@ export default {
rules: [ rules: [
{ {
required: true, required: true,
message: "请输入角色别名", message: "请输入角色编码",
trigger: "blur",
},
],
},
{
label: "现有别名",
labelTip: "当前系统已存在的角色别名,点击可快速录入",
prop: "currentAlias",
type: "radio",
dicData: [],
headerAlign: "center",
align: "center",
props: {
label: "roleName",
value: "roleAlias",
},
hide: true,
span: 24,
},
{
label: "角色排序",
prop: "sort",
type: "number",
headerAlign: "center",
align: "center",
span: 24,
rules: [
{
required: true,
message: "请输入角色排序",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -312,10 +331,15 @@ export default {
}); });
}, },
submit() { submit() {
const menuList = this.$refs.treeMenu.getCheckedKeys();
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); const menuList = this.$refs.treeMenu ? this.$refs.treeMenu.getCheckedKeys() : [];
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); const dataScopeList = this.$refs.treeDataScope ? this.$refs.treeDataScope.getCheckedKeys() : [];
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { const apiScopeList = this.$refs.treeApiScope ? this.$refs.treeApiScope.getCheckedKeys() : [];
console.log(this.idsArray, "this.idsArray")
console.log(this.selectionList, "this.idsArray")
// ID
grant([this.currentRoleId], menuList, dataScopeList, apiScopeList).then(() => {
this.box = false; this.box = false;
this.$message({ this.$message({
type: "success", type: "success",
@ -411,29 +435,32 @@ export default {
this.dataScopeTreeObj = []; this.dataScopeTreeObj = [];
this.apiScopeTreeObj = []; this.apiScopeTreeObj = [];
grantTree().then((res) => { grantTree().then((res) => {
this.menuGrantList = res.data.data.menu; const data = res.data.result
this.dataScopeGrantList = res.data.data.dataScope; this.menuGrantList = data.menu;
this.apiScopeGrantList = res.data.data.apiScope; this.dataScopeGrantList = data.dataScope || [];
this.apiScopeGrantList = data.apiScope || [];
getRole(this.ids).then((res) => { getRole(this.ids).then((res) => {
this.menuTreeObj = res.data.data.menu; this.menuTreeObj = res.data.result.menu;
this.dataScopeTreeObj = res.data.data.dataScope; this.dataScopeTreeObj = res.data.result.dataScope || [];
this.apiScopeTreeObj = res.data.data.apiScope; this.apiScopeTreeObj = res.data.result.apiScope || [];
this.box = true; this.box = true;
}); });
}); });
}, },
handleRowRole(row) { handleRowRole(row) {
this.currentRoleId = row.id; // ID
this.menuTreeObj = []; this.menuTreeObj = [];
this.dataScopeTreeObj = []; this.dataScopeTreeObj = [];
this.apiScopeTreeObj = []; this.apiScopeTreeObj = [];
grantTree().then((res) => { grantTree().then((res) => {
this.menuGrantList = res.data.data.menu; const data = res.data.result
this.dataScopeGrantList = res.data.data.dataScope; this.menuGrantList = data.menu;
this.apiScopeGrantList = res.data.data.apiScope; this.dataScopeGrantList = data.dataScope || [];
this.apiScopeGrantList = data.apiScope || [];
getRole(row.id).then((res) => { getRole(row.id).then((res) => {
this.menuTreeObj = res.data.data.menu; this.menuTreeObj = res.data.result.menu;
this.dataScopeTreeObj = res.data.data.dataScope; this.dataScopeTreeObj = res.data.result.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope; this.apiScopeTreeObj = res.data.result.apiScope;
this.selectionList.push(row); this.selectionList.push(row);
this.box = true; this.box = true;
}); });

@ -0,0 +1,162 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="batchSelectionTitle"
:visible.sync="batchSelectionVisible"
:append-to-body="true"
width="70%"
@close="handleCloseDetail"
fullscreen
>
<el-table :data="tableData" style="width: 100%" border>
<!-- 展开行详情 -->
<el-table-column type="expand">
<template slot-scope="props">
<!-- 关联表单列表带复选框 -->
<el-table
:data="props.row.oneFormList || []"
size="mini"
style="width: 100%"
@selection-change="(val) => handleSelectionChange(val, props.row)"
border
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="#" width="55" />
<!-- <el-table-column label="表单ID" prop="id" width="80" /> -->
<el-table-column label="物料名称" prop="materialName" />
<el-table-column label="物料编码" prop="materialCode" />
<el-table-column label="规格型号" prop="model" />
<!-- <el-table-column label="申请数量" prop="applicationQuantity" /> -->
<el-table-column label="单价" prop="unitPrice" width="80" />
</el-table>
</template>
</el-table-column>
<!-- 常规列展示 -->
<!-- <el-table-column label="物料ID" prop="materialId" /> -->
<el-table-column label="物料编码" prop="materialCode" />
<el-table-column label="物料名称" prop="materialName" />
<el-table-column label="规格型号" prop="model" />
<el-table-column label="申请数量" prop="applicationQuantity" />
<el-table-column label="已出库数量" prop="outboundQuantity" />
<el-table-column label="部门" prop="departmentName" />
<el-table-column label="单位" prop="unit" />
</el-table>
<div style="text-align: right; margin-top: 20px">
<el-button @click="handleConfirmSelect">确认选择</el-button>
</div>
</el-dialog>
</template>
<style>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 15px;
width: 50%;
}
/* 适配嵌套表格样式 */
.demo-table-expand .el-table {
--el-table-header-text-color: #666;
--el-table-row-hover-bg-color: #f8f9fa;
}
/* 展开行内表格样式优化 */
.el-table__expanded-cell .el-table {
margin-bottom: 16px;
}
</style>
<script>
export default {
props: {
batchSelectionVisible: {
type: Boolean,
default: false
},
batchSelectionTitle: {
type: String,
default: '物料出库信息'
},
tableData: {
type: Array,
default: () => []
},
inBatchForm:{
type:Object,
default:()=>{}
}
},
data() {
return {
//
selectedRows: []
};
},
methods: {
//
handleSelectionChange(selection, parentRow) {
console.log('666666',selection, parentRow)
//
const selectionWithParent = selection.map(item => ({
...item,
parentMaterialId: parentRow.materialId, // ID
parentDepartmentName: parentRow.departmentName, //
applicationQuantity: parentRow.applicationQuantity,
ldDemandEndId:parentRow.ldDemandEndId,
// outboundQuantity:parentRow.outboundQuantity,
}));
//
this.selectedRows = this.selectedRows.filter(
item => item.parentMaterialId !== parentRow.materialId
);
//
this.selectedRows.push(...selectionWithParent);
console.log('777777',selection, parentRow,this.selectedRows)
//
},
// -
handleConfirmSelect() {
console.log(1222)
console.log(this.selectedRows,'00000')
// this.$emit('confirm-selection', this.selectedRows);
this.batchSelectionVisible = false;
this.$emit('selectionChange', this.selectedRows);
//
// this.handleCloseDetail();
},
// //
handleCloseDetail() {
// this.$emit('update:batchSelectionVisible', false);
// this.$emit('handleCloseDetail')
this.$emit('selectionChange', this.selectedRows);
},
},
mounted() {
console.log(9999999,this.inBatchForm)
}
}
</script>

@ -1,18 +1,18 @@
<template> <template>
<el-dialog :close-on-click-modal="false" :title="demandDialogTitle" :visible.sync="consumableVisible" <el-dialog :close-on-click-modal="false" :title="demandDialogTitle" :visible.sync="consumableVisible"
:append-to-body="true" width="70%" @close="handleCloseDetail" fullscreen> :append-to-body="true" width="70%" @close="handleCloseDetail" fullscreen>
<basic-container> <basic-container class="dialog-content">
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:page.sync="page" :permission="permissionList" @row-del="rowDel" @search-change="searchChange" :page.sync="page" :permission="permissionList" @row-del="rowDel" @search-change="searchChange"
@search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
@size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
@row-change="handleRowChange"> @row-change="handleRowChange">
<!-- <template slot-scope="scope" slot="menu">
<el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录
</el-button>
</template> -->
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -32,15 +32,15 @@ export default {
return { return {
form: {}, form: {},
selectionList: [], selectionList: [],
query: {}, query: { type: "NY" },
loading: true, loading: true,
page: { page: {
pageSize: 10, pageSize: 5,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
option: { option: {
height: "auto", // height: "auto",
calcHeight: 30, calcHeight: 30,
tip: false, tip: false,
searchShow: true, searchShow: true,
@ -88,11 +88,13 @@ export default {
type: "select", type: "select",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
value: "NY",
disabled: true,
dicData: [ dicData: [
{ // {
label: "易耗品", // label: "",
value: "YH", // value: "YH",
}, // },
{ {
label: "耐用品", label: "耐用品",
value: "NY", value: "NY",
@ -145,7 +147,8 @@ export default {
ckTable: [], ckTable: [],
rkTable: [], rkTable: [],
currentRow: null, currentRow: null,
}; allSelectedList: [], //
}
}, },
computed: { computed: {
permissionList() { permissionList() {
@ -226,9 +229,21 @@ export default {
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
}, },
// //
selectionChange(list) { selectionChange(list) {
this.selectionList = list; console.log("勾选选中", list)
const currentPageIds = this.data.map(item => item.id)
console.log(currentPageIds, "currentPageIds")
this.allSelectedList = this.allSelectedList.filter(item => !currentPageIds.includes(item.id))
console.log(this.allSelectedList, '1')
this.allSelectedList.push(...list)
console.log('所有勾选数据:', this.allSelectedList)
},
//
handleConfirm() {
console.log(6)
console.log(this.allSelectedList, 'chuan')
this.$emit("confirm", this.allSelectedList)
}, },
selectionClear() { selectionClear() {
this.selectionList = []; this.selectionList = [];
@ -236,8 +251,12 @@ export default {
}, },
handleRowChange(row, index, data) { handleRowChange(row, index, data) {
console.log('Selected data:', data); console.log('Selected data:', data);
console.log('select row', row)
//
}, },
currentChange(currentPage) { currentChange(currentPage) {
console.log(currentPage, 1)
this.handleRowChange() this.handleRowChange()
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
}, },
@ -249,17 +268,17 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
console.log(this.query, 2)
getList( getList(
page.currentPage, page.currentPage,
page.pageSize, page.pageSize,
Object.assign(params, this.query) Object.assign(params, this.query)
).then((res) => { ).then((res) => {
// const data = res.data.data; this.data = res.data.result.list
this.data = res.data.result.list;
this.loading = false; this.loading = false;
this.page.total = res.data.result.total; this.page.total = res.data.result.total;
// this.selectionClear(); })
});
this.loading = false; this.loading = false;
}, },
}, },
@ -267,3 +286,17 @@ export default {
</script> </script>
<style lang="scss" scoped>
::v-deep.el-dialog__footer {
position: fixed !important;
bottom: 0 !important;
right: 0 !important;
}
::v-deep.dialog-content {
max-height: calc(100vh - 200px);
overflow-y: auto;
padding-right: 10px;
overflow-x: hidden;
}
</style>

@ -704,8 +704,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-table td, ::v-deep .el-table td,
::v-deep .el-table th { ::v-deep .el-table th {
text-align: center !important; text-align: center !important;

@ -36,7 +36,7 @@
<el-form-item label="选项"> <el-form-item label="选项">
<el-radio-group v-model="sizeForm.options" @change="radioChange()" <el-radio-group v-model="sizeForm.options" @change="radioChange()"
:disabled="outDialogType == 'details'"> :disabled="outDialogType == 'details'">
<el-radio :label="1" :disabled="sizeForm.type == 2"><span @click="closeHandle">批量选择</span></el-radio> <el-radio :label="1" :disabled="sizeForm.type == 2"><span >批量选择</span></el-radio>
<el-radio :label="2">单项选择</el-radio> <el-radio :label="2">单项选择</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -58,7 +58,7 @@
</el-row> </el-row>
<div class="form-title">{{ outDate }} 出库信息</div> <div class="form-title">{{ outDate }} 出库信息</div>
<el-button type="primary" size="mini" style="margin-bottom: 18px;" @click="inTableAdd()" <el-button type="primary" size="mini" style="margin-bottom: 18px;" @click="inTableAdd()"
v-if="sizeForm.options == 2">新增</el-button> v-if="sizeForm.options == 2 && outDialogType != 'details'">新增</el-button>
<el-table :data="sizeForm.inTableData" border style="width: 100%"> <el-table :data="sizeForm.inTableData" border style="width: 100%">
<el-table-column prop="materialCode" label="物资编码"> <el-table-column prop="materialCode" label="物资编码">
</el-table-column> </el-table-column>
@ -102,22 +102,22 @@
</el-table-column> </el-table-column>
<el-table-column prop="applicationQuantity" label="申请数量" v-if="sizeForm.options == 1"> <el-table-column prop="applicationQuantity" label="申请数量" v-if="sizeForm.options == 1">
</el-table-column> </el-table-column>
<el-table-column prop="outboundQuantity" label="已出库数量" v-if="sizeForm.options == 1"> <!-- <el-table-column prop="outboundQuantity" label="已出库数量" v-if="sizeForm.options == 1">
<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 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="0" 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'"
<!-- <span v-else>{{ scope.row.theOutboundQuantity || 0 }}</span> --> v-if="sizeForm.optionType === 'YH' ||inBatchForm.optionType === 'YH'"></el-input-number>
<span v-else>{{ scope.row.theOutboundQuantity = 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" v-if="sizeForm.optionType === 'YH' || inBatchForm.optionType === 'YH'" <el-table-column label="操作" style="text-align: center;" v-if="outDialogType != 'details'">
style="text-align: center;">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="text-align: center;"> <div style="text-align: center;" :disabled="outDialogType == 'details'">
<el-button type="text" size="mini" @click="handleDelete(scope.$index, scope.row)"> <el-button type="text" size="mini" @click="handleDelete(scope.$index, scope.row)">
删除 删除
</el-button> </el-button>
@ -165,13 +165,13 @@
</el-table> </el-table>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer" v-if="outDialogType != 'details'">
<el-button @click="handleCloseDetail()"> </el-button> <el-button @click="handleCloseDetail()"> </el-button>
<el-button type="primary" @click="submit(1)">暂存</el-button> <el-button type="primary" @click="submit(1)">暂存</el-button>
<el-button type="primary" @click="submit(2)">提交</el-button> <el-button type="primary" @click="submit(2)">提交</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 批量出库 选择弹窗 --> <!-- 批量出库 选择数据源弹窗 -->
<el-dialog :close-on-click-modal="false" title="选择数据来源" :visible.sync="inBatchDialogVisible" :append-to-body="true" <el-dialog :close-on-click-modal="false" title="选择数据来源" :visible.sync="inBatchDialogVisible" :append-to-body="true"
width="40%" @close="handleBatchClose" @open="getQuarterList"> width="40%" @close="handleBatchClose" @open="getQuarterList">
<el-form :model="inBatchForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic"> <el-form :model="inBatchForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
@ -214,64 +214,25 @@
<el-button type="primary" @click="batchSubmit()"> </el-button> <el-button type="primary" @click="batchSubmit()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择弹窗 -->
<el-dialog :close-on-click-modal="false" title="选择耐用品" :visible.sync="goodsVisible" :append-to-body="true" <!-- 单条新增耐用品弹窗 -->
width="70%"> <consumableDialog v-if="consumableVisible" :consumableVisible='consumableVisible'
<!-- 搜索区域 --> :demandDialogTitle="demandDialogTitle" @handleCloseDetail="handleCloseDetail" @confirm="confirm">
<div class="search-container" style="margin-bottom: 15px;">
<el-input v-model="searchKeyword" placeholder="请输入物资名称搜索" clearable style="width: 300px;"
@keyup.enter.native="handleSearch">
<el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button>
</el-input>
</div>
<el-table :data="goodsList" border style="width: 100%" @selection-change="goodsListSelectionChange">
<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="部门" v-if="sizeForm.options == 2">
</el-table-column>
<el-table-column prop="applicationQuantity" label="申请数量">
</el-table-column>
<el-table-column prop="outboundQuantity" label="已出库数量">
<template slot-scope="scope">
{{ scope.row.outboundQuantity || 0 }}
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
:page-sizes="[5, 10, 20, 50]" :page-size="pageSize" :total="total"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button @click="goodsVisible = false"> </el-button>
<el-button type="primary" @click="goodsSubmit()"> </el-button>
</span>
</el-dialog>
<consumableDialog v-if="consumableVisible" :consumableVisible='consumableVisible' :demandDialogTitle="demandDialogTitle"
@handleCloseDetail="handleCloseDetail">
</consumableDialog> </consumableDialog>
<batchSelectionDialog v-if="batchSelectionVisible" :batchSelectionVisible='batchSelectionVisible'
:batchSelectionTitle="batchSelectionTitle" :tableData="batchTableData"
@batchclose="batchclose" :inBatchForm="inBatchForm" @confirm-selection="handleConfirmSelection" @selectionChange="selectionChange"></batchSelectionDialog>
</div> </div>
</template> </template>
<script> <script>
import { getQuarterList, getDepartmentList, getDetailedList, getDetailedItems, submitData, getMaterialList, editList } from "@/api/firstOrder/outbound"; import { getQuarterList, getDepartmentList, getDetailedList, getDetailedItems, submitData, getMaterialList, editList, batchList } from "@/api/firstOrder/outbound";
import consumableDialog from './consumableDialog.vue' import consumableDialog from './consumableDialog.vue'
import batchSelectionDialog from './batchSelectionDialog.vue'
export default { export default {
components: { components: {
consumableDialog, consumableDialog,
batchSelectionDialog
}, },
props: { props: {
repairVisible: { repairVisible: {
@ -297,9 +258,16 @@ export default {
}, },
data() { data() {
return { return {
dialogVisible: false,
materialList: [],
demandDialogTitle: '耐用品出库', demandDialogTitle: '耐用品出库',
batchSelectionTitle: '耐用品出库',
goodsVisible: false, goodsVisible: false,
batchSelectionVisible: false,
batchSelection: true, //
batchTableData: [],
consumableVisible: false, // consumableVisible: false, //
batchSelection: false,
quarterList: [], quarterList: [],
departmentList: [], departmentList: [],
outDialogVisible: false, outDialogVisible: false,
@ -325,25 +293,16 @@ export default {
}, },
goodsList: [], goodsList: [],
goodsSelectList: [], goodsSelectList: [],
inTableData: [], // inTableData: [],
inBatchDialogVisible: false,// inBatchDialogVisible: false,//
batchType: '',// batchType: '',//
inBatchForm: { inBatchForm: { //
batchType: '', batchType: '', //
department: '', department: '', //
optionType: '', optionType: '', //YH/NY
}, },
quarterYearMap: {}, quarterYearMap: {},
quarterQuarterMap: {}, quarterQuarterMap: {},
rules: {
reason: [
{ required: true, message: '事由不能为空', trigger: 'blur' }
],
materialType: [
{ required: true, message: '请选择物资类型', trigger: 'change' }
]
//
}
} }
}, },
computed: { computed: {
@ -371,6 +330,18 @@ export default {
// this.getMaterialList() // this.getMaterialList()
}, },
methods: { methods: {
batchclose() {
this.batchSelectionVisible = false
},
selectionChange(row){
this.batchSelectionVisible = false
this.sizeForm.inTableData=row
},
confirm(allSelectedList) {
this.consumableVisible = false
this.sizeForm.inTableData = allSelectedList
console.log(this.sizeForm.inTableData, '111220')
},
// // // //
// async getMaterialList() { // async getMaterialList() {
// const { data: res } = await this.$http.get('material/getMaterialList') // const { data: res } = await this.$http.get('material/getMaterialList')
@ -415,34 +386,31 @@ export default {
// this.$message.error(""); // this.$message.error("");
// } // }
// }, // },
// //
goodsListSelectionChange(val) { goodsListSelectionChange(val) {
this.goodsSelectList = JSON.parse(JSON.stringify(val)); this.goodsSelectList = JSON.parse(JSON.stringify(val));
}, },
//
// // goodsSubmit() {
goodsSubmit() { // if (this.goodsSelectList.length > 0) {
if (this.goodsSelectList.length > 0) { // const newItems = this.goodsSelectList.map(item => ({
const newItems = this.goodsSelectList.map(item => ({ // ...item,
...item, // materialId: item.materialId,
materialId: item.materialId, // materialCode: item.materialCode,
materialCode: item.materialCode, // materialName: item.materialName,
materialName: item.materialName, // model: item.model,
model: item.model, // type: item.type,
type: item.type, // unit: item.unit,
unit: item.unit, // department: item.departmentId,
department: item.departmentId, // departmentName: item.departmentName,
departmentName: item.departmentName, // theOutboundQuantity: 0
theOutboundQuantity: 0 // }));
})); // this.sizeForm.inTableData.push(...newItems);
// this.batchSelectionVisible = true;
this.sizeForm.inTableData.push(...newItems); // } else {
this.goodsVisible = false; // this.$message.warning('')
} else { // }
this.$message.warning('请先勾选需要添加的数据'); // },
}
},
depchange(value) { depchange(value) {
this.departmentList = this.departmentList this.departmentList = this.departmentList
}, },
@ -480,7 +448,9 @@ export default {
row.theOutboundQuantity = maxAllowQuantity; row.theOutboundQuantity = maxAllowQuantity;
} }
} }
if (this.sizeForm.optionType === 'NY') {
row.theOutboundQuantity = 1
}
}, },
// //
handleCloseDetail() { handleCloseDetail() {
@ -532,7 +502,57 @@ export default {
} }
}, },
// //
async batchSubmit() { // async batchSubmit() {
// if (!this.inBatchForm.batchType) {
// this.$message.error('');
// return;
// }
// if (!this.inBatchForm.department) {
// this.$message.error('');
// return;
// }
// if (!this.inBatchForm.optionType) {
// this.$message.error('');
// return;
// }
// const res = await getDetailedList({
// ids: this.inBatchForm.batchType,
// departmentId: this.inBatchForm.department,
// optionType: this.inBatchForm.optionType,
// })
// if (res.data && res.data.result) {
// this.sizeForm.inTableData = res.data.result
// const selectedDept = this.departmentList.find(
// dept => dept.departmentId === this.inBatchForm.department
// )
// const deptName = selectedDept ? selectedDept.department : '';
// this.sizeForm.inTableData = res.data.result.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 (this.inBatchForm.optionType === 'NY') {
// this.batchSelectionVisible = true;
// this.batchTableData = res.data.result;
// }
// this.$nextTick(() => {
// this.$forceUpdate();
// })
// } else {
// this.$message.warning('');
// }
// },
async batchSubmit() {
if (!this.inBatchForm.batchType) { if (!this.inBatchForm.batchType) {
this.$message.error('请选择需求单'); this.$message.error('请选择需求单');
return; return;
@ -545,57 +565,80 @@ export default {
this.$message.error('请选择类别'); this.$message.error('请选择类别');
return; return;
} }
const res = await getDetailedList({
const requestParams = {
ids: this.inBatchForm.batchType, ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department, departmentId: this.inBatchForm.department,
optionType: this.inBatchForm.optionType, optionType: this.inBatchForm.optionType,
}) };
try {
let res;
if (this.inBatchForm.optionType === 'YH') {
res = await getDetailedList(requestParams);
} else if (this.inBatchForm.optionType === 'NY') {
res = await batchList(requestParams);
}
if (res.data && res.data.result) { if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result this.sizeForm.inTableData = res.data.result;
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.map(item => ({ this.sizeForm.inTableData = res.data.result.map(item => ({
...item, ...item,
IdDemandEndld: this.inBatchForm.batchType, IdDemandEndld: this.inBatchForm.batchType,
// department: this.inBatchForm.department,
department: deptName department: deptName
})) }));
//
this.inBatchDialogVisible = false; this.inBatchDialogVisible = false;
//
const selectedQuarter = this.quarterList.find( const selectedQuarter = this.quarterList.find(
item => item.ids === this.inBatchForm.batchType item => item.ids === this.inBatchForm.batchType
) );
if (selectedQuarter) { if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName; this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
} }
//
if (this.inBatchForm.optionType === 'NY') { if (this.inBatchForm.optionType === 'NY') {
this.goodsVisible = true console.log(this.inBatchForm.optionType, 'this.inBatchForm.optionType')
this.data.goodsList = res.data.result this.batchSelectionVisible = true;
this.dialogVisible = true;
console.log(1)
this.batchTableData = res.data.result;
} }
//
this.$nextTick(() => { this.$nextTick(() => {
this.$forceUpdate(); this.$forceUpdate();
}); });
} else { } else {
this.$message.warning('未获取到详细数据'); this.$message.warning('未获取到详细数据');
} }
} catch (error) {
}, this.$message.error(`获取${this.inBatchForm.optionType === 'YH' ? '易耗品' : '耐用品'}数据失败:${error.message}`);
console.error('批量提交接口调用失败:', error);
}
},
// //
goodsListSelectionChange(val) { goodsListSelectionChange(val) {
this.goodsSelectList = val this.goodsSelectList = val
}, },
// //
goodsSubmit() { // goodsSubmit() {
if (this.goodsSelectList.length > 0) { // if (this.goodsSelectList.length > 0) {
this.sizeForm.inTableData.push(...this.goodsSelectList); // this.sizeForm.inTableData.push(...this.goodsSelectList);
this.$forceUpdate(); // this.$forceUpdate();
} else { // } else {
this.$message.warning('请先勾选需要添加的数据'); // this.$message.warning('');
} // }
this.goodsVisible = false // this.batchSelectionVisible = true;
}, // },
// //
async getDetailedItems() { async getDetailedItems() {
this.loading = true this.loading = true
@ -615,8 +658,9 @@ export default {
// //
async getMaterialList() { async getMaterialList() {
this.loading = true this.loading = true
this.goodsVisible = false;
this.consumableVisible = false;
try { try {
if (this.sizeForm.optionType === "NY") { if (this.sizeForm.optionType === "NY") {
this.consumableVisible = true this.consumableVisible = true
} else { } else {
@ -671,13 +715,15 @@ export default {
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData
let arr = this.departmentList.find(item => item.departmentId === this.inBatchForm.department || {}) let arr = this.departmentList.find(item => item.departmentId === this.inBatchForm.department || {})
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData.map(row => { this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData.map(row => {
console.log(row, 'row')
const deptId = row.department const deptId = row.department
const dept = this.list.find(item => item.departmentId === deptId); const dept = this.list.find(item => item.departmentId === deptId);
console.log(dept, 'dept') const oneFormId = row.id
return { return {
...row, ...row,
department: this.sizeForm.options == '1' ? arr.departmentId : deptId, department: this.sizeForm.options == '1' ? arr.departmentId : deptId,
departmentName: this.sizeForm.options == '1' ? arr.department : dept.department, departmentName: this.sizeForm.options == '1' ? arr.department : dept.department,
oneFormId: oneFormId
} }
}) })
console.log(this.sizeForm, '111') console.log(this.sizeForm, '111')
@ -701,60 +747,95 @@ export default {
}, },
// //
async inInit() { async inInit() {
if (this.outDialogType == 'details' || this.outDialogType == 'edit') { if (this.outDialogType == 'details' || this.outDialogType == 'edit') {
try { editList(this.id).then(res => {
const res = await editList(this.id); console.log(res.data.result, '详情数据')
const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {}; const { ldOneOutStorage, ldOneOutStorageDetails } = res.data.result || {};
if (!ldOneOutStorage) {
this.$message.error("回显数据异常");
return;
}
const handledDetailList = ldOneOutStorageDetails.map(item => ({
...item,
outboundQuantity: item.outboundQuantity || 0
}))
this.sizeForm = {
...this.sizeForm,
...ldOneOutStorage,
outDate: ldOneOutStorage.outDate ? new Date(ldOneOutStorage.outDate) : '',
options: Number(ldOneOutStorage.options) || 1,
}
this.sizeForm.inTableData = handledDetailList;
} catch (error) { // this.sizeForm = res.data.result.ldOneOutStorage
this.$message.error("获取详情数据失败"); this.sizeForm.inTableData = res.data.result.ldOneOutStorageDetails
} this.sizeForm.orderNo = ldOneOutStorage.orderNo
this.sizeForm.reason = ldOneOutStorage.reason
this.sizeForm.demandEndInfo = ldOneOutStorage.demandEndInfo
this.sizeForm.outDate = ldOneOutStorage.outDate
this.sizeForm.options = Number(ldOneOutStorage.options)
// reason: '',//
// inAccountsTableData: [],//
// inTableData: [],
// ldOneOutStorageDetailVOList: [],
// demandEndInfo: '',//
// outDate: '',//
// options: 2,//
// optionType: '', // 1 2
// materialType: '1',//
// status: '',//1 2
// materialld: '',//Id
this.$set(this.sizeForm,'inTableData',res.data.result.ldOneOutStorageDetails)
console.log(this.sizeForm, '111')
})
} }
}, },
// this.sizeForm = {
// // ...this.sizeForm,
// // ...ldOneOutStorage,
// // outDate: ldOneOutStorage.outDate ? new Date(ldOneOutStorage.outDate) : '',
// // options: Number(ldOneOutStorage.options) || 1,
// // inTableData: ldOneOutStorageDetails
// }
// })
// try {
// const res = await editList(this.id)
// console.log(res, '')
// const { ldOneOutStorage, ldOneOutStorageDetails = [] } = res.data.result || {};
// if (!ldOneOutStorage) {
// this.$message.error("");
// return;
// }
// // const handledDetailList = ldOneOutStorageDetails.map(item => ({
// // ...item,
// // outboundQuantity: item.outboundQuantity || 0
// // }))
// console.log(handledDetailList, 'handledDetailList')
// this.sizeForm = {
// ...this.sizeForm,
// ...ldOneOutStorage,
// outDate: ldOneOutStorage.outDate ? new Date(ldOneOutStorage.outDate) : '',
// options: Number(ldOneOutStorage.options) || 1,
// inTableData: ldOneOutStorageDetails
// }
// // console.log(this.sizeForm.inTableData, 'this.sizeForm')
// } catch (error) {
// this.$message.error("");
// }
// //
async radioChange() { radioChange() {
this.sizeForm.inTableData = [] this.sizeForm.inTableData = []
this.sizeForm.optionType = ''; this.sizeForm.optionType = '';
if (this.sizeForm.options === 1) { if (this.sizeForm.options === 1) {
await this.getQuarterList() this.getQuarterList()
this.inBatchDialogVisible = true this.inBatchDialogVisible = true
this.$nextTick(() => {
this.$forceUpdate();
});
}
},
closeHandle() {
this.inBatchForm.batchType = '', this.inBatchForm.batchType = '',
this.inBatchForm.department = '' this.inBatchForm.department = ''
this.inBatchForm.optionType = '' this.inBatchForm.optionType = ''
this.sizeForm.inTableData = [] }
this.getQuarterList()
this.inBatchDialogVisible = true
this.$nextTick(() => {
this.$forceUpdate();
});
// this.sizeForm.inTableData = []
}, },
// closeHandle() {
// this.inBatchForm.batchType = '',
// this.inBatchForm.department = ''
// this.inBatchForm.optionType = ''
// this.sizeForm.inTableData = []
// this.getQuarterList()
// this.inBatchDialogVisible = true
// // this.sizeForm.inTableData = []
// },
// //
handleDelete(index, row) { handleDelete(index, row) {
this.sizeForm.inTableData.splice(index, 1) this.sizeForm.inTableData.splice(index, 1)
@ -776,15 +857,6 @@ export default {
// this.getMaterialList() // this.getMaterialList()
} }
}, },
//
goodsVisible(newVal) {
if (newVal) {
//
this.searchKeyword = '';
this.currentPage = 1;
this.loadGoodsList();
}
}
} }
} }
</script> </script>

@ -143,13 +143,20 @@ export default {
prop: "unitPrice", prop: "unitPrice",
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
formatter: (row, column) => {
const value = row.unitPrice;
if (value === null || value === undefined || value === "") {
return "-";
}
return value;
}
}, },
{ // {
label: "金额", // label: "",
prop: "amount", // prop: "amount",
headerAlign: "center", // headerAlign: "center",
align: "center", // align: "center",
}, // },
{ {
label: "描述", label: "描述",
prop: "remark", prop: "remark",

@ -102,13 +102,13 @@ export default {
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
}, },
{ // {
label: "出库类型", // label: "",
prop: "outType", // prop: "outType",
width: 140, // width: 140,
headerAlign: "center", // headerAlign: "center",
align: "center", // align: "center",
}, // },
{ {
label: "出库日期", label: "出库日期",
prop: "outDate", prop: "outDate",
@ -146,19 +146,19 @@ export default {
value: '2' value: '2'
}] }]
}, },
{ // {
label: "部门", // label: "",
prop: "department", // prop: "department",
align: "center", // align: "center",
headerAlign: "center", // headerAlign: "center",
formatter: (row, column) => { // formatter: (row, column) => {
const value = row.department; // const value = row.department;
if (value === null || value === undefined || value === "") { // if (value === null || value === undefined || value === "") {
return "无"; // return "";
} // }
return value; // return value;
} // }
}, // },
{ {
label: "出库人", label: "出库人",
prop: "shipperName", prop: "shipperName",
@ -168,25 +168,25 @@ export default {
headerAlign: "center", headerAlign: "center",
}, },
// { {
// label: "", label: "状态",
// prop: "status", prop: "status",
// type: 'select', type: 'select',
// dicData: [ dicData: [
// { {
// label: '', label: '暂存',
// value: 1 value: 1
// }, },
// { {
// label: '', label: '待审批',
// value: 2 value: 2
// }, },
// { {
// label: '', label: '已审批',
// value: 3 value: 3
// }, },
// ] ]
// }, },
] ]
}, },
@ -210,11 +210,12 @@ export default {
}, },
// //
handleDetails(row) { handleDetails(row) {
console.log(row, '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')
}, },
// //
handleEdit(row) { handleEdit(row) {

@ -339,6 +339,7 @@ export default {
}) })
.then(() => { .then(() => {
this.onLoadChild(this.pageChild); this.onLoadChild(this.pageChild);
this.$refs.crudChild.refresh();
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"

Loading…
Cancel
Save