123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- const pickerOptions = {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- shortcuts: [
- {
- text: "今天",
- onClick(picker) {
- picker.$emit("pick", new Date());
- },
- },
- {
- text: "昨天",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24);
- picker.$emit("pick", date);
- },
- },
- {
- text: "一周前",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit("pick", date);
- },
- },
- ],
- };
- const columns = [
- {
- title: "采购组织",
- key: "puOrg",
- type: "InputDialog",
- value: [],
- required: true,
- },
- { title: "需求来源", key: "source", type: "Input", value: "采购创建" },
- { title: "采购员", key: "buyer", value: [], type: "InputDialog" },
- { title: "交易类型", key: "billYpe", value: [], type: "InputDialog" },
- { title: "物料编码", key: "material", type: "Input", required: true },
- {
- title: "物料名称",
- key: "materialName",
- type: "InputDialog",
- value: [],
- required: true,
- },
- {
- title: "物料/物料描述",
- key: "materialDesc",
- type: "InputDialog",
- value: [],
- required: true,
- },
- { title: "生产厂家", key: "manufacturer", type: "Input" },
- { title: "收货客户", key: "customer", type: "InputDialog", value: [] },
- {
- title: "采购单位",
- key: "puUnit",
- type: "InputDialog",
- value: [],
- required: true,
- },
- {
- title: "采购数量",
- key: "puQty",
- type: "InputNumber",
- required: true,
- },
- {
- title: "需求时间",
- key: "demandDate",
- type: "DatePicker",
- config: { type: "date", pickerOptions: pickerOptions },
- },
- { title: "项目名称", key: "projectName", type: "InputDialog", value: [] },
- { title: "需求人", key: "demandPersonal", type: "InputDialog", value: [] },
- {
- title: "需求组织",
- key: "demandOrg",
- type: "InputDialog",
- value: [],
- require: true,
- },
- { title: "需求部门", key: "demandDept", type: "InputDialog", value: [] },
- { title: "建议供应商", key: "supplier", type: "InputDialog", value: [] },
- { title: "收货人", key: "a", type: "InputDialog", value: [] },
- { title: "收货组织", key: "b", type: "InputDialog", value: [] },
- { title: "收货人联系方式", key: "c", type: "Input" },
- { title: "收货地址", key: "d", type: "Input" },
- { title: "收货仓库", key: "e", type: "InputDialog", value: [] },
- {
- title: "指定供应商",
- key: "assignSupplier",
- type: "InputDialog",
- value: [],
- },
- { title: "单位", key: "unit", type: "InputDialog", value: [] },
- { title: "收货地址", key: "f", type: "InputDialog", value: [] },
- ];
- export const initColumns = () => columns;
|