|
@@ -64,6 +64,94 @@
|
|
|
:gysList="gysList"
|
|
|
v-show="!contentShow"
|
|
|
/>
|
|
|
+ <Modal v-model="poolModalShow" title="新增采购订单" :width="700">
|
|
|
+ <Row class="mainCont">
|
|
|
+ <Col span="4" class-name="tables">单据类型</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <Select clearable v-model="addForm.djlx" style="width: 95%">
|
|
|
+ <Option
|
|
|
+ v-for="item in djlxList"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ >{{ item.label }}</Option>
|
|
|
+ </Select>
|
|
|
+ </Col>
|
|
|
+
|
|
|
+ <Col span="4" class-name="tables">采购人</Col>
|
|
|
+ <Col span="4" class-name="tables">{{ addForm.cgr }}</Col>
|
|
|
+ <Col span="4" class-name="tables">采购人联系方式</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <Input
|
|
|
+ v-model="addForm.cgrlxfs"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 95%"
|
|
|
+ />
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">下单日期</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <DatePicker
|
|
|
+ style="width: 95%"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :value="addForm.xdrq"
|
|
|
+ @on-change="addForm.xdrq=$event"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="请选择"
|
|
|
+ ></DatePicker>
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">交货时间</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <DatePicker
|
|
|
+ style="width: 95%"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ :value="addForm.jhsj"
|
|
|
+ :options="jhsjOptions"
|
|
|
+ @on-change="addForm.jhsj=$event"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择"
|
|
|
+ ></DatePicker>
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">收货人</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <Input
|
|
|
+ v-model="addForm.shr"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 95%"
|
|
|
+ />
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">收货人联系方式</Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ <Input
|
|
|
+ v-model="addForm.shrlxfs"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 95%"
|
|
|
+ />
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">供应商</Col>
|
|
|
+ <Col span="12" class-name="tables">
|
|
|
+ <Select
|
|
|
+ clearable
|
|
|
+ v-model="addForm.gys"
|
|
|
+ @on-change="gysChange"
|
|
|
+ filterable
|
|
|
+ style="width: 95%"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="item in gysList"
|
|
|
+ :value="item.gpId"
|
|
|
+ :key="item.gpId"
|
|
|
+ >{{ item.gpName }}</Option>
|
|
|
+ </Select>
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">供方负责人</Col>
|
|
|
+ <Col span="4" class-name="tables">{{ addForm.gffzr }}</Col>
|
|
|
+ <Col span="4" class-name="tables">供应商联系电话</Col>
|
|
|
+ <Col span="4" class-name="tables">{{ addForm.gyslxdh }}</Col>
|
|
|
+ </Row>
|
|
|
+ <div slot="footer">
|
|
|
+ <Button @click="poolModalCancel">取消</Button>
|
|
|
+ <Button type="primary" @click="poolModalOk">确定</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -74,13 +162,15 @@ import {
|
|
|
getAreaList,
|
|
|
getProjectList,
|
|
|
tbiGoodsCategoryList,
|
|
|
- selectGoodProviderSelectionList
|
|
|
+ selectGoodProviderSelectionList,
|
|
|
+ getLabelByCode4Purchase
|
|
|
} from "@/service/getData";
|
|
|
export default {
|
|
|
components: { poolAdd },
|
|
|
data() {
|
|
|
return {
|
|
|
contentShow: true,
|
|
|
+ poolModalShow: false,
|
|
|
// 自适应尺寸↓
|
|
|
resizeHeight: 100,
|
|
|
resizeWidth: 100,
|
|
@@ -94,16 +184,34 @@ export default {
|
|
|
sgjh: "",
|
|
|
sqr: ""
|
|
|
},
|
|
|
+ addForm: {
|
|
|
+ djlx: "",
|
|
|
+ cgr: "",
|
|
|
+ cgrlxfs: "",
|
|
|
+ xdrq: "",
|
|
|
+ jhsj: "",
|
|
|
+ shr: "",
|
|
|
+ shrlxfs: "",
|
|
|
+ gys: "",
|
|
|
+ gffzr: "",
|
|
|
+ gyslxdh: ""
|
|
|
+ },
|
|
|
ssqyList: [],
|
|
|
ssxmList: [],
|
|
|
gysList: [],
|
|
|
allFlList: [],
|
|
|
yjflList: [],
|
|
|
ejflList: [],
|
|
|
+ djlxList: [],
|
|
|
// 表格参数
|
|
|
tableLoading: false,
|
|
|
pageTotal: 0,
|
|
|
pageNum: 1,
|
|
|
+ jhsjOptions: {
|
|
|
+ disabledDate: date => {
|
|
|
+ return date && date.valueOf() < new Date(this.addForm.xdrq);
|
|
|
+ }
|
|
|
+ },
|
|
|
tableColumn: [
|
|
|
{
|
|
|
type: "selection",
|
|
@@ -214,6 +322,13 @@ export default {
|
|
|
selectGoodProviderSelectionList().then(res => {
|
|
|
this.gysList = res.data;
|
|
|
});
|
|
|
+ getLabelByCode4Purchase({ dictCode: "billType" }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.djlxList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
tbiGoodsCategoryList().then(res => {
|
|
|
this.allFlList = res.data.data;
|
|
|
let arr = [];
|
|
@@ -256,6 +371,28 @@ export default {
|
|
|
this.contentShow = true;
|
|
|
// this.$router.push("/index/purchaseOrder");
|
|
|
},
|
|
|
+ gysChange(val) {
|
|
|
+ this.gysGo = true;
|
|
|
+ let gys = this.gysList.filter(a => a.gpId == val);
|
|
|
+ if (gys.length > 0) {
|
|
|
+ let sup = gys[0];
|
|
|
+ if (!sup.gpcName || !sup.gpcPhone) {
|
|
|
+ this.$Message.error(
|
|
|
+ "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
|
|
|
+ );
|
|
|
+ this.gysGo = false;
|
|
|
+ this.addForm.gffzr = "";
|
|
|
+ this.addForm.gyslxdh = "";
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.addForm.gffzr = sup.gpcName;
|
|
|
+ this.addForm.gyslxdh = sup.gpcPhone;
|
|
|
+ // bank开户行 unionpay银行账号
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //批量采购弹窗
|
|
|
+ poolModalCancel() {},
|
|
|
+ poolModalOk() {},
|
|
|
//批量采购
|
|
|
plcg() {
|
|
|
let project = "";
|
|
@@ -347,7 +484,7 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.mainCont .tables {
|
|
|
- height: 50px;
|
|
|
+ min-height: 50px;
|
|
|
border-right: 1px solid #e4e4e4;
|
|
|
border-bottom: 1px solid #e4e4e4;
|
|
|
display: flex;
|