|
@@ -4,7 +4,7 @@
|
|
|
:label-col="{ span: 4 }"
|
|
:label-col="{ span: 4 }"
|
|
|
:wrapper-col="{ span: 16 }"
|
|
:wrapper-col="{ span: 16 }"
|
|
|
>
|
|
>
|
|
|
- <a-form-item label="盘点单名称" class="m-form-item">
|
|
|
|
|
|
|
+ <a-form-item label="盘点单名称" :rules="[{ required: true }]" class="m-form-item">
|
|
|
<a-input v-model:value="inventorySheetName" size="default" />
|
|
<a-input v-model:value="inventorySheetName" size="default" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
|
@@ -30,6 +30,15 @@
|
|
|
</template>
|
|
</template>
|
|
|
</a-tree>
|
|
</a-tree>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
+ <a-form-item label="使用部门" class="m-form-item">
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ v-model:value="responseOrganization"
|
|
|
|
|
+ :options="orgs"
|
|
|
|
|
+ mode="multiple"
|
|
|
|
|
+ placeholder="请选择使用部门"
|
|
|
|
|
+ @change="responseOrganizationChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
</a-form>
|
|
</a-form>
|
|
|
<a-divider style="margin:14px 0 20px 0 !important;" />
|
|
<a-divider style="margin:14px 0 20px 0 !important;" />
|
|
|
<a-button type="primary" @click="previous">上一步</a-button>
|
|
<a-button type="primary" @click="previous">上一步</a-button>
|
|
@@ -69,6 +78,9 @@ export default {
|
|
|
accountDate: dayjs().format('YYYY-MM-DD'), //账面日期
|
|
accountDate: dayjs().format('YYYY-MM-DD'), //账面日期
|
|
|
plannedStartDate: null, //计划开始时间
|
|
plannedStartDate: null, //计划开始时间
|
|
|
plannedEndDate: null, //计划结束时间
|
|
plannedEndDate: null, //计划结束时间
|
|
|
|
|
+ responseOrganization: undefined, // 使用部门
|
|
|
|
|
+ orgs: [],
|
|
|
|
|
+ selectedOrgs: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted: function() {
|
|
mounted: function() {
|
|
@@ -101,6 +113,7 @@ export default {
|
|
|
plannedStartDate: _self.plannedStartDate,
|
|
plannedStartDate: _self.plannedStartDate,
|
|
|
plannedEndDate: _self.plannedEndDate,
|
|
plannedEndDate: _self.plannedEndDate,
|
|
|
assetInventoryDepartment: [],
|
|
assetInventoryDepartment: [],
|
|
|
|
|
+ responseOrganization: _self.selectedOrgs,
|
|
|
};
|
|
};
|
|
|
_self.treeData.forEach(function(item) {
|
|
_self.treeData.forEach(function(item) {
|
|
|
var data = {
|
|
var data = {
|
|
@@ -164,6 +177,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // 使用部门选择事件
|
|
|
|
|
+ responseOrganizationChange: function(value,option) {
|
|
|
|
|
+ let _self = this;
|
|
|
|
|
+ _self.selectedOrgs = option.map(item => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: item.value,
|
|
|
|
|
+ name: item.name,
|
|
|
|
|
+ no: item.no,
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 从服务器查询所有的部门,并组合成树,显示在前端
|
|
* 从服务器查询所有的部门,并组合成树,显示在前端
|
|
|
*/
|
|
*/
|
|
@@ -173,31 +198,36 @@ export default {
|
|
|
var organizationDatas = [];
|
|
var organizationDatas = [];
|
|
|
OrganizationResource.getOrganizations().then(successData => {
|
|
OrganizationResource.getOrganizations().then(successData => {
|
|
|
_self.loading = false;
|
|
_self.loading = false;
|
|
|
- successData.forEach(function(item) {
|
|
|
|
|
|
|
+ if(successData != null && successData.length > 0) {
|
|
|
|
|
+ successData.forEach(function(item) {
|
|
|
// let clientName = (item.clientName == null ? '未定义' : item.clientName);
|
|
// let clientName = (item.clientName == null ? '未定义' : item.clientName);
|
|
|
// let rootTreeNode = _self.getRootTreeNode(_self.treeData, clientName);
|
|
// let rootTreeNode = _self.getRootTreeNode(_self.treeData, clientName);
|
|
|
// if (rootTreeNode == null) {
|
|
// if (rootTreeNode == null) {
|
|
|
- var rootTreeNode = {
|
|
|
|
|
- title: item.name,
|
|
|
|
|
- key: item.no,
|
|
|
|
|
- id: item.id,
|
|
|
|
|
- checked: false,
|
|
|
|
|
- index: 0,
|
|
|
|
|
- disabled: false,
|
|
|
|
|
- children: [],
|
|
|
|
|
- };
|
|
|
|
|
- _self.treeData.push(rootTreeNode);
|
|
|
|
|
- _self.treeList.push({
|
|
|
|
|
- title: item.name,
|
|
|
|
|
- checked: false,
|
|
|
|
|
- key: item.no,
|
|
|
|
|
- id: item.id,
|
|
|
|
|
|
|
+ var rootTreeNode = {
|
|
|
|
|
+ title: item.name,
|
|
|
|
|
+ key: item.no,
|
|
|
|
|
+ id: item.id,
|
|
|
|
|
+ checked: false,
|
|
|
|
|
+ index: 0,
|
|
|
|
|
+ disabled: false,
|
|
|
|
|
+ children: [],
|
|
|
|
|
+ };
|
|
|
|
|
+ _self.treeData.push(rootTreeNode);
|
|
|
|
|
+ _self.treeList.push({
|
|
|
|
|
+ title: item.name,
|
|
|
|
|
+ checked: false,
|
|
|
|
|
+ key: item.no,
|
|
|
|
|
+ id: item.id,
|
|
|
|
|
+ });
|
|
|
|
|
+ // }
|
|
|
|
|
+ if (item.childrenDatas != null && item.childrenDatas.length > 0) {
|
|
|
|
|
+ _self.newNode(rootTreeNode, item.childrenDatas);
|
|
|
|
|
+ }
|
|
|
|
|
+ _self.orgs.push(
|
|
|
|
|
+ {value: item.id, label: item.name ? item.name : item.description,name: item.name,no: item.no},
|
|
|
|
|
+ );
|
|
|
});
|
|
});
|
|
|
- // }
|
|
|
|
|
- if (item.childrenDatas != null && item.childrenDatas.length > 0) {
|
|
|
|
|
- _self.newNode(rootTreeNode, item.childrenDatas);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
}, errorData => {
|
|
}, errorData => {
|
|
|
_self.loading = false;
|
|
_self.loading = false;
|
|
|
Common.processException(errorData);
|
|
Common.processException(errorData);
|