|
@@ -15,7 +15,46 @@
|
|
@size-change="dataList"
|
|
@size-change="dataList"
|
|
@current-change="dataList"
|
|
@current-change="dataList"
|
|
>
|
|
>
|
|
|
|
+ <template #menu-left="{ size }">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ :size="size"
|
|
|
|
+ @click="openDialog(0,null)"
|
|
|
|
+ >出库
|
|
|
|
+ <template #icon>
|
|
|
|
+ <svg-icon icon-class="paicheng" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <template #menu="{ size, row, index }">
|
|
|
|
+ <el-button
|
|
|
|
+ @click="openDialog(1,row.id)"
|
|
|
|
+ text
|
|
|
|
+ type="primary"
|
|
|
|
+ :size="size">明细
|
|
|
|
+ <template #icon>
|
|
|
|
+ <svg-icon icon-class="paicheng" />
|
|
|
|
+ </template>
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog1.visible"
|
|
|
|
+ :title="dialog1.title"
|
|
|
|
+ width="1300px"
|
|
|
|
+ @close="dialog1.visible = false"
|
|
|
|
+ >
|
|
|
|
+ <choice_out @searchMaterials="handleMaterials"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog2.visible"
|
|
|
|
+ :title="dialog2.title"
|
|
|
|
+ width="1300px"
|
|
|
|
+ @close="dialog2.visible = false"
|
|
|
|
+ >
|
|
|
|
+ <task_details :taskId="clickTaskId" :dialog1="dialog2"/>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -26,11 +65,27 @@ import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
import { useCommonStoreHook } from "@/store";
|
|
import { useCommonStoreHook } from "@/store";
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
-const test = () => {
|
|
|
|
- isShowTable.value = true;
|
|
|
|
- tableType.value = tableType.value == 1 ? 2 : 1;
|
|
|
|
|
|
+const openDialog = (type,taskId) => {
|
|
|
|
+ if(type == 0){
|
|
|
|
+ dialog1.visible = true;
|
|
|
|
+ }else{
|
|
|
|
+ clickTaskId.value = taskId + ""
|
|
|
|
+ dialog2.visible = true;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+const clickTaskId = ref(null)
|
|
|
|
+const dialog1 = reactive({
|
|
|
|
+ title: "出库选择",
|
|
|
|
+ visible: false,
|
|
|
|
+});
|
|
|
|
+const dialog2 = reactive({
|
|
|
|
+ title: "任务明细",
|
|
|
|
+ visible: false,
|
|
|
|
+});
|
|
|
|
+const handleMaterials = (list) =>{
|
|
|
|
+ dialog1.visible = false
|
|
|
|
+ dataList();
|
|
|
|
+}
|
|
// 传入一个url,后面不带/
|
|
// 传入一个url,后面不带/
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
useCrud({
|
|
useCrud({
|
|
@@ -39,7 +94,9 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
|
|
const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
-
|
|
|
|
|
|
+const typeList = ref([
|
|
|
|
+ {"label": "一类库","value": "1"},{"label": "二类库","value": "2"}
|
|
|
|
+])
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
// 设置表格列或者其他自定义的option
|
|
// 设置表格列或者其他自定义的option
|
|
option.value = Object.assign(option.value, {
|
|
option.value = Object.assign(option.value, {
|
|
@@ -47,94 +104,37 @@ option.value = Object.assign(option.value, {
|
|
selection: false,
|
|
selection: false,
|
|
viewBtn: false,
|
|
viewBtn: false,
|
|
editBtn: false,
|
|
editBtn: false,
|
|
- menu: false,
|
|
|
|
|
|
+ menu: true,
|
|
addBtn: false,
|
|
addBtn: false,
|
|
column: [
|
|
column: [
|
|
{
|
|
{
|
|
label: "任务单号",
|
|
label: "任务单号",
|
|
prop: "taskNo",
|
|
prop: "taskNo",
|
|
search: true,
|
|
search: true,
|
|
- width:150,
|
|
|
|
overHidden: true
|
|
overHidden: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "计划单号",
|
|
|
|
- prop: "planNo",
|
|
|
|
- search: true,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "类型",
|
|
|
|
- prop: "type",
|
|
|
|
- type: "select",
|
|
|
|
- search: true,
|
|
|
|
- dicData:[{label: "入库",value: "1"},{label: "出库",value: "2"},{label: "退料",value: "3"}],
|
|
|
|
|
|
+ label: "仓库类别",
|
|
|
|
+ prop: "outType",
|
|
|
|
+ type: 'select',
|
|
|
|
+ dicData: typeList
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "物料编号",
|
|
|
|
- width: 130,
|
|
|
|
- overHidden: true,
|
|
|
|
- prop: "materialNo",
|
|
|
|
|
|
+ label: "创建时间",
|
|
|
|
+ prop: "created",
|
|
|
|
+ display: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "物料名称",
|
|
|
|
- width:150,
|
|
|
|
- overHidden: true,
|
|
|
|
- prop: "materialName",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "批次号",
|
|
|
|
- prop: "batchCode",
|
|
|
|
- width:150,
|
|
|
|
- overHidden: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "总数量",
|
|
|
|
- prop: "num",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "已操作数量",
|
|
|
|
- prop: "completedNum",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "待操作数量",
|
|
|
|
- prop: "unDoNum",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "单位",
|
|
|
|
- prop: "unit",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "仓库",
|
|
|
|
- prop: "houseType",
|
|
|
|
- type: "select",
|
|
|
|
- search: true,
|
|
|
|
- dicUrl:
|
|
|
|
- dictDataUtil.request_url +
|
|
|
|
- dictDataUtil.TYPE_CODE.warehouse_type,
|
|
|
|
- props: {
|
|
|
|
- label: "dictLabel",
|
|
|
|
- value: "dictValue",
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "状态",
|
|
|
|
- prop: "state",
|
|
|
|
- type: "select",
|
|
|
|
- search: true,
|
|
|
|
- dicUrl:
|
|
|
|
- dictDataUtil.request_url +
|
|
|
|
- dictDataUtil.TYPE_CODE.warehouse_task_state,
|
|
|
|
- props: {
|
|
|
|
- label: "dictLabel",
|
|
|
|
- value: "dictValue",
|
|
|
|
- }
|
|
|
|
|
|
+ label: "创建人",
|
|
|
|
+ prop: "creator",
|
|
|
|
+ display: false
|
|
},
|
|
},
|
|
],
|
|
],
|
|
});
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
// console.log("crudRef", crudRef)
|
|
// console.log("crudRef", crudRef)
|
|
- //search.value.type = '1'
|
|
|
|
|
|
+ search.value.type = '2'
|
|
dataList();
|
|
dataList();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|