|
@@ -16,7 +16,7 @@
|
|
|
@current-change="dataList"
|
|
|
:row-style="rowStyle"
|
|
|
:cell-style="cellStyle"
|
|
|
- @selection-change="selectionChange"
|
|
|
+ @selection-change="selectionChange1"
|
|
|
>
|
|
|
<!-- <template #menu-left="{ size }">
|
|
|
<el-button
|
|
@@ -37,29 +37,31 @@
|
|
|
</template>
|
|
|
</el-button>–>
|
|
|
</template>-->
|
|
|
+ <template #menu-left="{}">
|
|
|
+ <el-button
|
|
|
+ :disabled="toDeleteIds.length < 1"
|
|
|
+ class="ml-3"
|
|
|
+ @click="printCode">二维码打印
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
<el-dialog
|
|
|
v-model="dialog1.visible"
|
|
|
:title="dialog1.title"
|
|
|
- width="950px"
|
|
|
@close="dialog1.visible = false"
|
|
|
+ width="85%"
|
|
|
>
|
|
|
- <choice-item-page @materialInfo="materialInfo" :enabled="null"/>
|
|
|
+ <print-stock-info :excelRow="clickObjs" />
|
|
|
</el-dialog>
|
|
|
- <ExcelUpload ref="uploadRef" @finished="uploadFinished" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
-import { syncPositionVehicle} from "@/api/storage";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
+import PrintStockInfo from "./print-stock-info.vue";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
-const test = () => {
|
|
|
- isShowTable.value = true;
|
|
|
- tableType.value = tableType.value == 1 ? 2 : 1;
|
|
|
-};
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
@@ -72,31 +74,25 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
|
|
|
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const dialog1 = reactive({
|
|
|
- title: "物料选择",
|
|
|
+ title: "物料打印",
|
|
|
visible: false,
|
|
|
});
|
|
|
-const materialInfo = (value) => {
|
|
|
- form.value.materialNo = value.materialCode
|
|
|
- form.value.materialName = value.materialName
|
|
|
- form.value.materialModel = value.spec
|
|
|
- form.value.unit = value.unitDictValue
|
|
|
- dialog1.visible = false
|
|
|
+const clickObjs = ref([])
|
|
|
+const selectionChange1 =(row)=>{
|
|
|
+ toDeleteIds.value = [];
|
|
|
+ row?.forEach((element) => {
|
|
|
+ toDeleteIds.value.push(element.id);
|
|
|
+ });
|
|
|
+ row.printNum = 1
|
|
|
+ clickObjs.value = row
|
|
|
}
|
|
|
-const syncPosition = () => {
|
|
|
- ElMessageBox.confirm("当前非同步任务,预计5秒内完成,确定同步库存吗?")
|
|
|
- .then(() => {
|
|
|
- syncPositionVehicle({}).then((data) => {
|
|
|
- ElMessage.success(data.msg);
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- // catch error
|
|
|
- });
|
|
|
+const printCode = () => {
|
|
|
+ dialog1.visible = true
|
|
|
};
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: true,
|
|
|
- selection: false,
|
|
|
+ selection: true,
|
|
|
addBtn: false,
|
|
|
editBtn: true,
|
|
|
column: [
|